This simple image should answer your question For an explanation: 1. Light travels in straight lines 2. read more
Pinhole differs from a lens that it is not focused to any specific distance. Objects from various distances draw a sharp image. The smaller the hole the sharper the image but a small hole passes only a little light so a pinhole camera is a compromise between the amount of light and the sharpness of the image. read more
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. read more