The others have already provided good explanations, but since it sounded like an interesting question and I already sketched up a diagram, I thought I would show it, too. As already mentioned, if you have an object that is to be shown as the exact same distance as the distance between you and the screen, it's very easy to represent that: It's just a single object on the screen that looks the same to both eyes. If, on the other hand, you want to show an object which is far away, then you need to 'trick' your eyes by showing two separate images on the screen, one for the left eye and another for the right eye. That's indicated by the two hollow green dots on the screen on the diagram below. And if you want to show an object which is closer to you than the actual screen distance, then to trick your eyes two images at the locations of the hollow blue dots need to be presented on screen. Note that for objects that are to appear closer than the screen distance that the placement of the images is reversed: The image for the left eye is to the right of the image for the right eye, and the image for the right eye is to the left of the image for the left eye.
It's interesting to note that the apparent distances of the objects are all scaled to the actual distance of the observer to the screen, so audience members will have somewhat different impressions of the distances to the on-screen objects depending on how far from the screen they are seated. Perhaps something to take into account the next time you go to see a 3D movie.
(P.S.: On the diagram the actual observer-to-screen distance is assumed to be 30 feet. Hence, an object to be presented at an apparent distance of 30 feet is represented by a single dot on the screen.)