Ultimately speaking, no matter how complex it may appear to be, any camera is just a box with a hole in the front that holds film (Think about that whilst looking at how much some of them cost!). It is perfectly possible to take pictures using just a pinhole in the front of a box, but such an arrangement doesn't let in enough light for a good picture (see aperture). Therefore the diffracting powers of glass can be harnessed in a glass lens (or plastic in very cheap cameras), as below.
In order for the film to do its job, the light from the subject must be focused on to the film, as above, and there must also be enough of it. Factors that affect how much light falls on to the film are: shutter speed, aperture and obviously; how bright the subject is. If too much light is allowed into the camera, the picture will appear too light and washed out, and is said to be "overexposed". If too little is let in then the picture will be dark with little contrast, and is said to be "underexposed".
The picture on the left has been underexposed, resulting in poor contrast. The brightness in the foreground is a result of the printer trying to get a picture out of a badly unexposed shot. The picture on the right has been overexposed, notice the lack of contrast visible in the top left of the picture where too much light has been allowed in to the camera and the negative has become nearly opaque. It is still possible to develop a good picture from overexposed negatives but not from underexposed negatives, as the detail has not been exposed onto the film to begin with.