Camera's "meter" (read light) by sampling areas within your camera's frame and deciding what settings will, on average, bring everything back to a mid-grey. This generally works pretty well, but a camera's internal light meter tends to "make mistakes" when you are taking pictures with extremely bright or dark areas or if there is a lot of white or black in your photos.
How to adjust the bright/shade problem in photos is a topic for another week. The other problem you run into is when you are dealing with mostly white or mostly black photos. It is not surprising that, with the camera's light meter trying to make everything mid-grey, photos with lots of white or lots of black will tend to look grey if you take your photo with the exposure settings that the camera suggests.
Yesterday I took a walk in the forest and took a lot of photos of the fresh snow. Perfect opportunity to take some picture to show you how to think for your camera when photographing whites and blacks.
The same concept applies for photos mostly of black. The camera slightly over-exposes black to try to bring the tones back to mid-grey. If we trick the camera by under-exposing the image slightly our blacks will be true black.
But how much should we over or under expose in normal conditions? Well that depends on the photograph and what you want to be correctly exposed. White and Black tend to need around 2 stops over or under exposure to get the correct colour. Mid-green, red and mid-blue will generally be correctly exposed at the "true exposure reading". Colours brigher than red (yellow, orange, skin tones) will need anywhere between +0.5 and +2 stops and darker colours will fall somewhere between -0.5 and -2.0
Metering using an external light meter, or grey-scale card is a much more accurate way of correctly exposing a shot, but the loose rule-of-thumb above will take your photos a long way. If it doesn't work out you can always change your settings and take another photo.
Intentionally over or under-exposing your photos is possible in all modes on your dSLR cameras, some bridge cameras and even some point-and-shoot cameras (although it is by far the easiest to manipulate when you use manual mode).