A pinhole camera (camera obscura), a predecessor of the modern day photographic camera, is an optical device of simple design in which an image is projected onto a screen. 

Prior to the advent of lens usage in photography, camera obscuras incorporated a simple pinhole instead to capture specific images.

In referencing the Centripedal theory of light, all objects emit light rays via reflection as points or dots and our eyes or a camera receive and detect these dots of light.  Disregarding diffraction, all lights waves travel in a straight line. As such, an illuminated object or landscape consists of inumerable light patches, each of which corresponds to one point (or pixel) of the object.  The pinhole has the ability to channel all light rays from these patches or points to pass through the pinhole and then to project each mapped dot of light onto a two dimensional plane.

In the pinhole camera, the small round opening of the pinhole keeps the incoming light rays on a straight path and does not allow them to widen and fall out of focus.  Therefore a recognizable image is projected onto a plane mounted with film, reproducing the object, scene or landscape at which the pinhole has been pointed.