A pinhole camera is the simplest camera possible. It consists of a light-proof box, some sort of film and a pinhole. The pinhole is simply an extremely small hole like you would make with the tip of a pin in a piece of thick aluminum foil.
A pinhole camera works on a simple principle. Imagine you are inside a large, dark, room-sized box containing a pinhole. Imagine that outside the room is a friend with a flashlight, and he is shining the flashlight at different angles through the pinhole. When you look at the wall opposite the pinhole, what you will see is a small dot created by the flashlight's beam shining through the pinhole. The small dot will move as your friend moves his flashlight. The smaller the pinhole (within limits), the smaller and sharper the point of light that the flashlight creates.
Now imagine that you take your large, dark, pinhole-equipped room outside and you point it at a nice landscape scene. When you look at the wall opposite the pinhole, what you will see is an inverted and reversed image of the scene outside. Each point in the scene emits light, and, just like the flashlight, the beam of light from that point passes through the pinhole and creates a point of light on the back wall. All of the points in the scene do that at the same time, so an entire image, in focus, is created on the back wall of the room. The image is very dim because the pinhole is so small, but you can see it if the room is very dark.
A pinhole camera is simply a smaller version of that room, and the film inside the camera replaces you. The film records the image that comes in through the pinhole. The camera records a nice, in-focus image of the scene that you point the camera at. Usually, you have to expose the film for a long time because the pinhole lets so little light through.
The pinhole in a pinhole camera acts as the lens. The pinhole forces every point emitting light in the scene to form a small point on the film, so the image is crisp. The reason a normal camera uses a lens rather than a pinhole is because the lens creates a much larger hole through which light can make it onto the film, meaning the film can be exposed faster.
Here are some interesting links: