Hold up a finger and focus on something in the distant background. While looking at the background alternate opening your left and right eye one at a time. You will find that your finger jumps back and forth (or splits into two). This is the parallax effect in action:
Parallax is this apparent shift caused by viewing an object from two different vantage points. Next, gradually pull your hand away from your face while still alternately opening and closing your right and left eye. Does the gap between the two images change?
Yes: the greater the distance, the smaller the gap.
Below is an interactive illustration with the red dot representing your finger and a tree representing a distant background. You can click and drag the red dot to bring it towards and away from your eyes to see what happens. Press c to cross/uncross your eyes:
This simple observation is the key to how we can measure things at a distance. Notice what happens when you direct your eyes to your finger instead of the background (this will cause you to cross your eyes slightly). Now the background splits into two images which are separated according to how far away your finger is.
The same effect is observed when we look at objects in our solar system from different positions on Earth. In this case the distant stars act as our fixed background and our finger is replaced by a distant object, such as Mars. If you took two pictures of Mars on different sides of the Earth you will find that it seems to jump positions, while the background stars do not. Observing objects from these different positions has the same effect as opening and closing our eyes, except now it’s over a much greater distance.
This means that the Moon would exhibit a greater parallax (or jump) as compared to Mars. Convince yourself of this using the interactive illustration below. Click and drag the planets and move the time slider to view the parallax effect from different positions on earth:
Challenge question: Could we use the parallax effect to measure the distance to the Moon?