Hold your hands up in front of your face, kung-fu style, and focus on a point in the background.Wink one eye shut. In doing so, you will now get only a 2d (flat) view of things.
Now swap! (eyes, that is.) See how your hands seem to "jump" in space as you wink back and forth?
When you look with both eyes, both of these viewpoints combine to make a 3D perspective. The only reason it doesn't seem so pop out and amazing as you'd think, is simply because your eyes are so used to it.
When taking a stereophotograph, I use a camera that has two lenses, set roughly about the same distance apart on the camera, as the eyes are in the face. So when I take a photo, the camera takes two pictures, each set slightly apart from the other.
When I view the result of the pictures - either as two images in a stereoscope, or two slides in a special holder, my eyes think they are seeing the object in the picture in stereo, that is, 3d space.
A stereoscope, or a stereo-slide viewer (for those of you familiar with Viewmaster!), serves to bring the double image close enough to the eyes to fool the brain into thinking it's looking at just one picture. Polarising glasses have a similar effect for viewing larger, or projected, images. It's another means of fooling the eyes into thinking that there's only one picture in front of it.