Leonardo da Vinci was the first to describe the phenomenon of light falling through a small opening into a dark room projecting on the opposite side of the hole an image (inverted and upside down) of the object from which the light emanates (Camera Obscura, 1558). It was only with the invention of photography in the 19th century that these images could be captured.
A pinhole camera is a variant of the Camera Obscura. It has no moving parts, but consists only of a light-tight housing with a tiny hole (pinhole), which limits the light entering the box. Pinhole cameras are light-weak, because the light rays are not bundled but only let through. Depending on the size of the pinhole, these rays of light are scattered, so that images taken with the pinhole camera are always slightly blurred. Due to the missing focal point, a pinhole camera shot is evenly sharp over the entire field of view (no limitation of depth of field). However, longer exposure times (from a few seconds - in sunny, cloudless weather to a few hours or days - in cloudy skies, dusk or indoor) are the rule.
A lens camera has a different setup. Its central element is a lens through which light falls into the camera and thus generates the image. There is a medium behind the lens to capture this image: Image sensor (digital photography) or film (analogue photography). The shutter release opens the lens and for a very short period of time (milliseconds) light falls into the camera, which stores the (more or less perfect) picture.
In the age of automatisms, computers and high-tech reflex cameras, simple cameras had no practical meaning for a long time, but they are perfectly suited (especially as a kit) to understand and experience the basic principles of photography ...