Have you taken a photo and it came out way too dark or too bright and you tried to fix it, but you just ended up making it worse? Trust me, it happens to everyone. Especially when you are just starting to figure out this whole photography thing. When you purchase a DSLR you most likely peruse the the manual to get the basics then put your memory card in and start shooting away. Well, most DSLR cameras and even some point and shoot cameras have multiple modes in the way they capture the photo's information. There is likely different compression modes of JPG and possibly even different levels of RAW capture. When you scroll through your camera's capture or "Quality" settings. You might see: JPG, fine JPG, norm JPG, RAW, and fine RAW. Each of these settings compresses (or doesn't compress) the photos you take in a different way. Photos taken with a JPG quality mode are usually much smaller photos because more of the information is compressed. You save room on your memory card and are able to take more photos. The RAW quality modes do not compress the photo which makes the files much larger so you have less space on your memory card to take photos. That is not necessarily a bad thing though. Let me tell you why shooting in RAW will help you make better photos.
This can get a little technical so bear with me. Imagine the photo you take is a rectangle full of information. Some of the information is seen and some of it is hidden. The "seen" information is basically what you see on your preview screen or on your computer screen when you are trying to edit the photo. The "unseen" information are things like exposure compensation, detail, shadows, highlights, skin tone, gradients etc. It was captured and it is there...but you just don't see it with the naked eye.
Here is where it gets good (I think). When you take a photo as a JPG, you are only taking the information that is seen and a little bit of the unseen information. So when you go to edit that photo you want to save don't have a lot of that unseen info that can help adjust your under or overexposed photos. When you do try to fix it you can end up with a bunch of noise in the photo or it just doesn't look natural at all. On the other hand if you had taken that same photo as a RAW file you capture ALL that unseen data and you will be much more likely to "save" that photo without all that ugly noise. Below are a few before and after examples of photos shot as JPG's and as RAW so you can make the call.
Yes, there is a trade off. By shooting only RAW files with your digital camera you will not be able to take as many photos on your memory card, but you can always carry more memory cards. So if you do make a mistake (I know...it rarely happens) you can have a better chance to "save" it with Photoshop, Camera Raw or Lightroom.
These photos I took in RAW format and was able to bring back to something pretty nice: