When you point the camera at a friend on vacation or a stunning landscape, the light reflected off of the subject will be collected by the lens. The lens is nothing more than a finely polished piece of glass that bends light so it all converges on a single focal point. Light travels slower through glass (or whatever medium the lens is made of, sometimes plastic) so when one side of a light ray hits the lens, part of it slows down and the ray bends. Think of it like a car. If the wheels on one side of the car turn slower than the other side, the car turns towards the slower wheels. When one side of a light ray travels faster than the other, the light will bend towards the slower side.
The image is captured on the recording surface where the light rays converge at the focal point. The recording surface is usually a film coated with light sensitive silver halide crystals, or in a digital camera, a charge-coupled device. If the film isn’t right at the focal point, the image will appear out of focus and blurry.
The lens will actually flip the object’s image onto the film. Because of the angle the light hits the glass, rays from the object that hit the edge of the lens bends more sharply than light that hits around the center. The light then converges on the film on the far side from where it started. Where the focal point falls is a property of both the curvature of the lens and how far away the object is. When you twist the focus on a camera, it moves the lens and the focal point closer or farther away from the film so you can focus on objects different distances away.