Imagine you're a robot trapped in a maze. You don't have a bird's-eye view so you can see all the possibilities (shown below left). Instead, you're inside it, and the walls are taller than you are (shown below right).
One well-known maze algorithm is called "Follow the left wall." The idea is to keep your left hand touching a wall. If suddenly your left hand isn't touching a wall, there's a corridor to the left, and in order to keep your hand on the left wall, you turn left and go down the corridor. If instead you bump into a wall in front of you, then in order to keep your hand on the left wall you'll have to turn right. (Draw a sketch if that doesn't make sense to you.) For many mazes, this simple algorithm will eventually get you to the exit.
There are problems about a robot in a grid with special procedures that don't exist in Snap!:
MOVE_FORWARD ()moves the sprite forward one grid square. (You need to call it repeatedly to move more than one grid square.)
ROTATE_LEFT ()or
ROTATE_RIGHT ()blocks always turn exactly 90 degrees. (They are used only to move a robot in a grid.)
CAN_MOVE (direction)block returns true or false depending on whether or not the robot can move in the input direction without running into a wall or walking off of the maze.