It works by having you look at 2 different images in each eye. Your right and left eye see different images that are projected in your VR glasses. This image simulates what you normally see when looking at real objects. The reason your eyes see in 3-D is because each eye sees the same image, but at a slightly different angle.
This difference gives us more information about a picture so our brain can map it to 3-D. This is the main way VR gets you to see computer generated images in 3-D, but that is not new and the same as a View Master
The big advancement with VR is that it use tracking to see where your head/eyes are pointed. As you look up, it can figure out how to change the images to simulate what you would see if you really were looking at something from that point. They can use 3 dots that send position data in real-time to figure out where you are in space.
More advanced VR systems can also track your eye movements, so when you look up, it shifts the images up. Very cool stuff!