New photographers often question which shooting format better fits their needs. There are a ton of articles out there that delve deep into the technical aspects of the two, but I have found that photographers learn best by seeing actual examples of subjects they are interested in shooting.
Here is a brief explanation of the two shooting formats along with their strengths and weaknesses.
JPEG
JPEG files are processed by the camera. The way they are processed varies depending on the model of camera. Color temperature and exposure of the image are set based on your camera settings when the photo is shot, but the camera also additionally processes the image further to add blacks, whites, contrast, brightness, noise reduction and sharpening. It then renders the file as a compressed JPEG. These files are finished and can be viewed and printed immediately after shot is taken.
Since JPEG's are compressed, the file is a "lossy" format. Much of the initial image information and detail is discarded and cannot be recovered. Dynamic Range detail in JPEG files is significantly reduced as compared to RAW.
RAW
RAW files are uncompressed image files which contain all of the detail available to the camera sensor. RAW is a "lossless" format. They are completely unprocessed and come out of the camera looking flat and dark. RAW images need to be viewed and processed using software such as Adobe Photoshop or Lightroom prior to being ready for display or print.
The amount of detail that can be recovered from RAW files is far superior to that of JPEG's. Areas that are underexposed or overexposed by several stops in a RAW file can be recovered with much less noise or artifacts than an edit of a JPEG. You can even change the white balance of an image after it has been taken without any quality loss in a RAW file.
So which is best?
Most DSLRs give users the option to shoot either RAW or JPEG, or both simultaneously. This can be very useful when you want high quality files, but also need to get an image out quickly. News agencies such as Reuters have recently required that images turned in to be shot in JPEG by their photographers in an attempt to curb manipulated photojournalism.
The image to the right would not have seen the light of day if not for this post. I was exposing for cloud flashes which caused the brighter lightning channel to be overexposed by several stops. As you can see it was mostly recovered in the RAW edit, while the highlights are blown out beyond recovery in the identical JPEG edit.
There are certain situations when shooting JPEG can be useful, such as shooting something really fast in burst mode where large RAW files can cause the camera to buffer. If you are shooting something casual, such as your nephew's birthday party, you may want to stick with JPEG then as well. However, if you are planning to edit your images and want them to look their best, you will be remissed shooting strictly JPEG.
Some may argue that RAW takes up too much space with many RAW files exceeding 25 megabytes opposed to jpeg files which can be a fraction of that size (1-6 megabytes). My rebuttal is to simply buy more storage. Memory cards of 128 gigabytes, hard drives exceeding 2 terabytes and limitless cloud space has never been more affordable.
Shooting all of your work in JPEG on a camera with RAW capabilities is like owning a Tesla and never taking it over 55mph.