Marco Tabini, writing for Macworld, describes the science of the parallax effect - a feature coming to iOS 7:
The basic principle that makes parallax possible is a quirk in the way the human perception of size works. Because the eye works by forcing light through a single point, the brain has learned to measure the size of objects based on the apparent angle between their extremities, as measured from our pupils. As a result, objects that are nearer tend to appear larger, while things that are farther away seem smaller.
This is the basis for our perception of perspective, and parallax is simply the apparent motion that objects take when you move around them. For example, when you travel on a fast car or train, objects that are closer to you appear to move much more quickly than those that are farther away, even though it stands to reason that, in reality, everything is changing place at the same speed.
Tabini further describes the hardware and software needed to pull off the effect. The technology actually has roots in rocket guidance systems.