RAW files are files that have not been adjusted. The data flows from the sensor to the camera's CPU and is saved as a RAW file. There many different RAW file types such as DNG, Pentax's PEF, Canon's CF2 and Nikon's NEF. All are RAW files.
RAW files, as stated earlier, have not been processed or adjusted. Therefore they must be processed in some way in order to get the most out of the file. This is usually done by adjusting the color, contrast, white balance, sharpness and noise reduction as needed. For this reason, a RAW file will almost always look less appealing than a JPEG file even when shooting RAW+JPEG.
RAW files can be adjusted in ways not possible with JPEGs. For example, color balance is fixed with JPEGs, but not so with RAW files. IF you shoot outside under daylight conditions while the camera's white balance has been set for, say, fluorescent, you'll end up with a heavy magenta color cast on all of your shots that cannot be removed. Do the same thing with a RAW file and you can easily adjust the image to perfect color every time. This is due to the fact that RAW files save color and brightness data as separate values while JPEGs combine them into just one.
RAW files do not have to be compressed while all JPEGs must be compressed to some degree. And when you do decide to compress a RAW file, the compression algorithm is lossless - not so with JPEGs. To make matters worse, every time you edit a JPEG, the image is re-compressed reducing image quality (albeit very slightly).
All JPEGs must be 8-bit files which means that they must have 256 tones from pure black to pure white per RGB channel. RAW files can be as high as 32-bit files, but usually they're 12-14 bits with some cameras shooting at 16 bits. Going from 8 to 14 bits may not sound like a lot, but consider that each bit doubles the number of tones per RGB channel. So while an 8-bit file has 256 tones (2^8 = 256), a 14-bit file has 16,384 (2^14 = 16,384) tones. That means simply by shooting the scene as a JPEG, you're throwing away 98% of the data that the sensor collected compared to a 14-bit RAW file.
So where is all of this "extra" data, you may ask? It's in the ability to color correct as I had stated, but it's primarily in the your capability to open up shadows and pull down the highlights. The bulk of the data is actually in the ability to open up shadows. Once converted to JPEG, all of that data is gone and you can no longer edit the file to anywhere near the same degree as a RAW file.
Now, once you edit your RAW files to the best that they can be, converting them to a JPEG so that they can be printed does not necessarily mean that you'll have a noticeably lower-quality image. This is providing that the amount of compression used is the lowest possible setting, along with the algorithm used to do the compressing is a good one. For example, the algorithm used by Facebook and Flickr is pretty bad when compared to what's used in Adobe Photoshop or Lightroom. This is why so many people complain about their images looking horrible once uploaded to social media even though they looked good on their computers.
Whether to shoot RAW or JPEG is a personal choice. Many professionals shoot RAW for the massive increase in control of editing their images. Others prefer to shoot JPEG so as to not to have to spend time editing the images in post. Photojournalists and high-volume portrait photographers often will shoot JPEG simply to avoid spending time in front of a computer; time that they would rather spend behind a camera making money.