In the real world, most pictures are stored either in color or in various layers of grey scale. For example, when each pixel element is stored as 8 bits, the number of states would be 256 - a number from 0 to 255. 0 represents white, 1 to 254 represents various scales of grey in increasing intensity, and 255 represents black. So when a color photo taken with a digital camera is converted to black and white, the correct term is actually a grey scale photo, because it has varying levels of black and white.
In color photographs, each pixel is made by combining various levels of primary colors. When an artist mixes colors with paints, he combines 2 colors to make a 3rd color. The primary colors are the colors which can combine to make all the colors required in a digital camera. In a typical camera, the primary colors used are Red, Green, and Blue (forming the RGB colors). Another set of primary colors used often are Cyan, Magenta, Yellow, and the Black (called the CMYK colors). Each color set has it's own advantages as it can capture a certain range of colors well. The rest of the post will be based on a RGB photo though it will equally apply to CMYK or any color set.
In the case of a RGB photo, each pixel uses up three storage units (for each color) of certain bit size associated with it. In the case of the 8-bit size storage unit, each pixel will have one storage unit each for intensity of red color (numbers 0 to 255 signifying varying levels of red color similar to the grey scale pictures discussed above), green color, and blue color. The various levels of red, green, and blue colors are mixed to form the actual color of that pixel. A picture stored in this manner would be 24-bit picture because each pixel would be stored in a 24-bit memory unit. The fact that the color of a pixel does not vary can be seen when you blow a picture beyond 100%. When the picture on the left is blown up to look at each pixel, the picture will look as the one on the right:

(Picture courtesy http://photo.net/equipment/digital/basics/)
The larger the resolution of the picture, the larger the number of pixels per inch (PPI). If one were to print a photo on paper, the resolution should be greater than 200 PPI on each side of the rectangle. A 3 MP camera can hence be used to print out photos of the 4" * 6" prints. The greater the resolution of the camera, the larger the size of the photo that can be printed out from it.
I will follow this post with a post on how the digital camera senses each photograph.
To get more information on this:
Photo.net's tutorial
Cambridge's tutorial