The best way to understand the functioning of an eye is to compare it to a camera. Just like a camera creates images by focusing on an object and allowing specific amounts of light to pass through its aperture to create a visual impression on the film, the eye functions in the same manner.
When light enters the eye, it passes through the cornea which transmits the light onto the pupil. The pupil, similar to the aperture in a camera, adjusts the amount of light that is transmitted onto the lens. The natural lens (similar to the camera lens) alters its shape by adjusting the eye muscles in order to precisely focus the light rays onto the retina.
The retina may be equated to a camera film. It is in the retina where the image is converted into electrical signals, which are then sent to the brain. The brain interprets these signals into what we perceive as sight.