3D photography or stereoscopic photography is the art of capturing and displaying two slightly offset photographs to create three dimensional images.
The 3D effect works because of a principle called stereopsis. Each eye is in a different location, and as a result, it sees a slightly different image. The difference between these images is what lets us perceive depth. This effect can be replicated with photography by taking two pictures of the subject that are offset by the same distance as your pupils (about 2.5 inches or 63 mm). The two images are then viewed so that each eye sees only the corresponding picture. Your brain puts the two images together just as it does for normal vision and you perceive a single three dimensional image.
This project will give you a brief introduction to the methods for taking and viewing 3D photographs.
Step 1: How to Take Stereoscopic 3D Pictures
This method works great for subjects that are still. But if you want to capture 3D images of moving objects, then you will need some additional hardware. If you have two cameras, then you can construct a simple two camera rig that mounts onto your tripod. In this kind of setup, the cameras are mounted 2.5 inches apart from center to center. To see a good example, check out this rig by user ciscu92. Then when taking the picture, you need to activate both cameras at the same time.
If you don't have two cameras, you can construct a mirror splitter like this one by user courtervideo. This rig uses mirrors to split the image and space each part at the appropriate distance. This lets you capture both views with a single camera.