I've been talking a lot about exposure above and you might wonder; how do I know I've got the right exposure? This is where the histogram comes in! A histogram is a graph representing the exposure value of the image and you can find it in most cameras and usually in the top right corner in most photo editing software. It ranges from the deepest shadows (left) to the brightest highlights (right). In most cases, you want a fairly even distribution but it depends on the brightness of the subject. If you are shooting a snowy landscape on a bright day you want an over representation to the right in the histogram, if you are shooting a portrait where the subject is wearing black clothes against a black background you want the opposite. What you don't want is the histogram to touch either side as this will mean that you either over or under exposed the image.
Check out this video by photographer Karl Taylor for a better understanding of histograms: