When you hold one finger upright in front of you, and close one eye at the time, you will see that the background shifts with respect to the finger when you look with a different eye. This effect is called parallax.
The shift in background happens because the distance from your eyes to the finger is shorter than the distance to the background. When you stretch your arm to hold your finger as far as you can, you will notice that the background shift is smaller.
As babies we learn through trial and error, to estimate distance to objects in this way. After some practice, the brain will automatically interpret the difference between the image seen by each eye, as a distance or a difference in distance to objects. Because we have two eyes, we can see in 3 D.
As a young lad I enjoyed drawing simple stereo images myself such as these pyramids.
If you bring them together you will see 3D. When viewing cross-eyed you will see an inverted pyramid. You can draw such pictures yourself and try both parallel and cross-eyed.
Watch an explanation of the difference between parallel and cross-eyed viewing here.
Seeing images in 3D is made easier by the historical stereoscope which forces each eye to see only one image.
With anaglyph images, the two images are overlapping and in two contrasting colours, e.g. red and blue.
With an anaglyph glasses you can then see the image in 3D.
The principle of parallax can be applied in astronomy as a powerful geometric tool to measure distances to nearby stars.