That's called 'parallax'.
To see it happen, go outside, hold your arm straight out in front
of your face and stick your thumb up. Close one eye, and notice
where your thumb appears against the houses across the street.
Now, don't move your arm, but just close the first eye and open
the other one. You'll see your thumb jump in front of a different
house. The angle that your thumb appeared to move is its parallax.