All the photos from dSLR cameras start as a RAW data file.
A RAW data file is like a film negative, can be developed in a number of ways, and can have just portions of it edited (local editing) with out changing any of the pixels (non-destructive editing).
Photos can be left as a RAW data file, or they can be converted in the camera to the JPEG image format.
A JPEG file is intended to be ready-to-print, and has been post processed (saturation, sharpening, contrast) to one degree or another in the camera. There are user selectable camera settings that can be used to change the amount of post processing done.
Some dSLRs offer a 3rd option, TIFF files.
Some dSLR's capture photos as 12-bit depth RAW files, 14-bit depth RAW files, or allow a choice of the 2.
JPEG is an 8-bit depth only format.
14-bit RAW files have 16,384 levels of tone in each color channel.
12-bit RAW files have 4096 levels of tone in each color channel.
8-bit JPEG files have 255 levels of tone in each color channel.
RAW data files are esssentially unedited photos that retain all the captured image data.
JPEG image print files do not retain all the image data the image sensor captured. In fact, at the highest JPEG setting, JPEG - Fine, the file is compressed at 1:4, or the files size is reduced to 1/4 of it's original size. In other words, a 10 MP camera's image sensor captures 10 MP of image data, but in the conversion to JPEG 8 MP of that image data is discarded before you ever see it, leaving you essentially a 2 MP ready-to-print photo.
Most of the image data lost converting a RAW data file to JPEG is color data, because it is not as critical to human perception as is the luminance data in the original RAW file.
Additionally the JPEG conversion forms MCU's (Minimum Coded Unit) blocks, typically 16 pixels x 16 pixels in size, that seriously limit the editing headroom available for any additional post processing work.