You can make a camera out of a shoebox with a small hole in one end. Known as a pinhole camera, this primitive device can actually focus an image and record it on film. To make a photograph, the box is loaded in the dark with a light-sensitive film or paper and the pinhole is covered with opaque tape. The exposed film or paper can be removed in a darkroom and the image developed. In a pinhole camera, the light waves from the object converge on the pinhole and focus the image upside down on the film.
Light is bent when it passes between substances having different densities.
The same effect occurs when light passes from the air through a piece of glass. If the glass is curved correctly, as it is in a camera lens, it can bend the light in such a way that an image of the scene in front of the lens is focused behind it. Refraction bends light when it passes between substances of different densities. The focal length of any lens is the distance between the optical center of the lens and the point at which it focuses an image. When you use a magnifying glass to focus the light from the sun onto a piece of paper, the area illuminated by the beam will become larger or smaller as you change the distance between the magnifying glass and paper.