Most people use what is known as binocular vision to perceive depth and see the world in 3D. The binocular vision system relies on the fact that we have two eyes. This separation causes each eye to see the world from a slightly different perspective. The brain fuses these two views together. It understands the differences and uses them to calculate distance creating our sense of depth and ability to gauge distance.
A simple way to understand this principle is to hold your thumb up at arm's length and close one eye. Then try closing the other eye. As you switch between open eyes you should see your thumb “jumping” back and forth against the background.