There are 5 main formats in which to store images. Why would you choose one over another, and what are the differences?
1. TIFF (also known as TIF), file types ending in .tif
TIFF stands for Tagged Image File Format. TIFF images create very large file sizes. TIFF images are uncompressed and thus contain a lot of detailed image data (which is why the files are so big) TIFFs are also extremely flexible in terms of color (they can be grayscale, or CMYK for print, or RGB for web) and content (layers, image tags).
TIFF is the most common file type used in photo software (such as Photoshop), as well as page layout software (such as Quark and InDesign), again because a TIFF contains a lot of image data.
2. JPEG (also known as JPG), file types ending in .jpg
JPEG stands for Joint Photographic Experts Group, which created this standard for this type of image formatting. JPEG files are images that have been compressed to store a lot of information in a small-size file. Most digital cameras store photos in JPEG format, because then you can take more photos on one camera card than you can with other formats.
A JPEG is compressed in a way that loses some of the image detail during the compression in order to make the file small (and thus called “lossy” compression).
JPEG files are usually used for photographs on the web, because they create a small file that is easily loaded on a web page and also looks good.
JPEG files are bad for line drawings or logos or graphics, as the compression makes them look “bitmappy” (jagged lines instead of straight ones).
3. GIF, file types ending in .gif
GIF stands for Graphic Interchange Format. This format compresses images but, as different from JPEG, the compression is lossless (no detail is lost in the compression, but the file can’t be made as small as a JPEG).
GIFs also have an extremely limited color range suitable for the web but not for printing. This format is never used for photography, because of the limited number of colors. GIFs can also be used for animations.
4. PNG, file types ending in .png
PNG stands for Portable Network Graphics. It was created as an open format to replace GIF, because the patent for GIF was owned by one company and nobody else wanted to pay licensing fees. It also allows for a full range of color and better compression.
It’s used almost exclusively for web images, never for print images. For photographs, PNG is not as good as JPEG, because it creates a larger file. But for images with some text, or line art, it’s better, because the images look less “bitmappy.”
When you take a screenshot on your Mac, the resulting image is a PNG–probably because most screenshots are a mix of images and text.
5. Raw image files
Raw image files contain data from a digital camera (usually). The files are called raw because they haven’t been processed and therefore can’t be edited or printed yet. There are a lot of different raw formats–each camera company often has its own proprietary format.
Raw files usually contain a vast amount of data that is uncompressed. Because of this, the size of a raw file is extremely large. Usually they are converted to TIFF before editing and color-correcting.
Most of this info is courtesy of Wikipedia, which is a great place to read more about all 5 file types.