In the old days, there were more graphics file formats (BMP, PCX, TIFF, TGA, and more) in use than there were languages spoken at the United Nations. These days, you knowing about JPEG is usually sufficient. All cameras save photos in this format, and every photo editing and viewing program can read it. It's one of the few truly universal file formats.
JPEG is called a lossy file format, however, because it compresses photos to save disk space. The more severely a photo is compressed, the lower its quality will be--as in the right-hand image shown here. (The original is shown on the left; the version on the right has been saved several times at medium quality.) Because of this characteristic, you should save JPEG files at the highest quality/lowest compression possible.
Some people who learn that saving JPEGs can affect image quality worry that simply viewing a photo can be hazardous. Don't worry: Opening a JPEG file doesn't affect its image quality. You can open the file in a photo editor, view it, and close it without altering its quality--just don't click Save.
You may hear about a format called RAW. This isn't a single file format, and you'll never see a file with a .raw extension. The term RAW refers to unprocessed file formats that store all of the information that your camera's sensor captures when it records digital images. Nikon uses the NEF format, for example, while Canon uses CRW and CR2. For details on working with RAW, read "Using Your Camera's RAW Mode."