The histogram is a simple graph which displays the brightness levels in an digital image, from darkest (left hand side) to lightest (right hand side). The height of the points shows how much of the image is found at any particular brightness level. If most of the highest points are clustered at the right-hand side of the histogram graph, for example, you'll have a photo with blown-out images.
Some cameras, such as Canons, also divide the histogram into five vertical sections to represent five zones covered by the camera's dynamic range (i.e. from very dark through to very light).
Learning to understand the histogram helps photographers to get their exposures correct, and helps with the understanding of digital imagery. On most DSLRs, the histogram can be displayed on the rear LCD screen, usually when the shots are being reviewed.
If an image is recorded in 8-bit mode (the lowest mode which even a basic compact digital camera will work in), there are 256 levels of brightness between absolute black (labeled as "0") and absolute white (labeled as "255").
The point at which all exposure metering measures and is located midway between black and white is 18% gray (labeled as "128"). You are therefore exposing at the midpoint of the camera's dynamic range. If a subject is exposed too close to either end of the spectrum, you will run into the limits of the camera's sensor.
A "good" histogram is generally regarded to be one which builds up from the shadows on the left gradually and eventually smoothes off in a gentle curve down into the extreme highlights on the right. The image shown here is a histogram such as that. However, unless the histogram is completely bunched up to the right (in which case you'll have a completely blown out image), there really isn't any such thing as a "bad" histogram. A histogram merely shows you how the image "is", and gives you the opportunity to re-shoot to correct any over or under-exposed areas.