The method of pinhole cameras goes back a long, long way to the very basic origins of image formation "caught in the box".

The simplest "how it works" explanation is that light rays from the scene pass through the single (pinhole) point and project an inverted image on the opposite side of the box (onto film, or any photosensitive material enclosed).
Our eyes, in bright light act in a similar way, as do modern cameras using quite small apertures. Pinholes don't have a mirror to flip the image right-way up, like the human brain does, or by which SLRs using mirror systems accomplish the same thing.

In this month's National Geographic magazine is a fascinating spread on pinhole photography using a large format set up to project images onto walls in homes, on the ground in floorless tents and a demonstration of the simplest visual explanation of image formation using a light globe to visibly project an inverted image of it inside an open (no photosensitive material) cardboard box pinhole "camera". It's well worth a look for the innovative twist on an old method.