The term camera comes from the camera obscura (Latin for “dark chamber”). It is not known when, for the first time, when someone saw some strange little shadows of the outer world on the walls of a dark room or, maybe, even a cave. It must have been in a sunny part of the world where people tried to hide from the heat and intense light in the darkness of their homes or shelters. Through a small crack in a wall or hole in a curtain the light seemed to play games with the people inside, projecting moving silhouettes, up side down, on the wall. Imagine their reaction. It took hundreds of years until someone found a practical application of this phenomenon. Observing the solar eclipses was probably one of the first (about 500 B.C. in China, later in Greece at around 350 B.C.). The first documented mention of the camera obscura was done by the Arabic scientist Ibn al-Haytham (Alhazen) in his Book of Optics (1015–1021).
Until the time when other image capturing technologies will develop, the “cameras consist of a darkened chamber or box, into which light is admitted through a pinhole (later a convex lens), forming an image of external objects on a surface of paper or glass, etc., placed at the focus of the lens” (Oxford English Dictionary).
The pinhole camera is a simple camera without a lens and with a single small opening on one side. Light from the subject passes through this “single point” and projects an inverted image on the opposite wall of the box. See How to Make and Use a Pinhole Camera.
Johannes Kepler later replaced the hole with a lens and made the apparatus transportable, in the form of a tent. The first camera that was small and portable enough for practical use was built by Johann Zahn in 1685. The first permanent photograph was made in 1826 by Joseph Nicéphore Niépce using a sliding wooden box camera. The first color photograph was made by Scottish physicist James Clerk Maxwell, with the help of English inventor and photographer Thomas Sutton, in 1861.