I don't want to get mired down trying to explain how it works, but I will say that Mark Barendt has it exactly right, and he understands how it works (see his post #20 for a simple set of rules).
If you've ever seen a photo that seemed like you were right there - as though you could almost step right into the picture - well, Mark just revealed how to do it.
A handful of people maintain that the print is a 2-D surface, and different viewing distances cannot make a difference. The truth is that IT DOES MAKE A DIFFERENCE.
Let me give an example. If you draw some circles on a piece of paper, they ought to appear round. But if you tilt the paper, the circles will flatten into an oval shape - everyone agrees with this, right? Ok, now pretend that you have drawn a handful of circles on a very large sheet of paper. Viewing head-on, from a considerable distance, all appear round. But as you get very close to the paper, things change: the circles directly in front of your eye (line of sight = perpendicular to the paper) are still round, but circles near the far edges of the paper become very oval-shaped.
Forget about this for a moment, now, and consider what happens when someone photographs a large group with a wide-angle lens. The people near the outer edges get curiously-elongated heads, which seem to stretch out towards the outer edges of the print. In short, it has an obvious wide lens distortion. Mark Barendt has made the opinion that this distortion effect is a result of viewing the print from too far away.
So what happens if we view this print from a close distance (keeping centered)? Well, the heads near the center still have a proper shape. But the heads near the edges, which at first seemed elongated, have now flattened into proper shape. It IS exactly as Mark said it would be - the proper viewing distance (and position) makes the scene look natural.
As some have pointed out, most people don't really care where you want them to stand, or how far to view from. They want to look anyway they darn well feel like. Mark says that you can control this to some extent - if you hang photos behind your couch, they can't get within several feet of it; if you hang photos in a hallway, they can't get more than a couple feet away. So if you plan ahead, read post #20 and shoot appropriately. This will give the most realistic "you are there" effect on the photo.
These ideas are not new in photographic literature. Stroebel has a section in View Camera Technique (5th edition, section 7.13 Apparent Perspective Effects: Viewing Distance). In essence, viewing a print from "too close" weakens (compresses) the apparent perspective effect. But this is not usually too objectionable. But viewing a print from "too far" makes the apparent perspective too strong, which tends to be more objectionable. So the safest thing with portraits is probably to shoot from a longer distance, using a longer lens; this mostly removes the risk of "viewing from too far."
There's a lot more to portraits than just this, but I think what I've said above has a lot of application to landscapes (with some foreground) and some other general scenic photography.