JPEG has two meanings: the Joint Photographic Experts Group and the JPEG file format for storing photo-type digital images - also known as .JPG, or JPG Interchange Format (JIF). The JPEG committee defined the original version(s) of the file format - the first standard being released in 1992. The format is sufficiently old, well-known and useful that virtually every piece of image-manipulation software can use .jpg files. These files usually have the extension (a.k.a. "file type") of .jpg, .jpeg, .jpe - and sometimes .jfif, .jif or .jfi.
JPEG (pronounced "JAY-Peg") has a lossy compression CODEC, allowing files to be made very small, at the expense of image quality. Software creating .jpg files usually has some control on the amount of compression, and so also on the image quality. This gives the user a trade-off choice between quality and file storage space - smaller files/lower quality, or larger files/higher quality. JPEG was designed for photographs, and so that the features lost in compression are hard for the eye to detect - thus files can be made small without much apparent reduction in visual quality. Being designed for photographs, and having lossy compression means that JPG files are not suitable for storage of some types images - e.g. line drawings, computer screen shots etc. - as the compression tends to make the edges "fuzzy" and the image generally look out-of-focus and noisy.
Most digital cameras can use .jpg as their internal storage format - and so most have an "image quality" setting, which changes the compression level. Some cameras have the option of using some form of "RAW", TIFF or other formats which have either non-lossy compression, or no compression at all, and so preserve full image quality.
There are a few variations in the .jpg format - which can produce incompatibilities, for example, Macintosh software often seems to produce .jpg files with a CMYK colour representation, whereas Windows programs can sometimes only work with .JPGs using RGB colours. Other variations allow (for example) lossless compression (and so larger, but high-quality files) and Progressive JPG - with increasing levels of detail throughout the file (allowing display of a low quality image quickly when obtaining an image from a slow connection; the detail is increased as more data arrives).
- The Wikipedia JPG article has a great deal of technical detail and examples