The RAW file format (file extension differs between camera brands – usually .cr2 for Canon, .nef for Nikon) is the uncompressed file that contains every bit of information that the sensor received and all the metadata the camera writes down.
All DSLR, MFT and mirrorless cameras that have interchangeable lens can shoot in RAW file format.
Many of the manufacturers started to introduce the format in many of the more advanced point and shoot cameras as well as some smartphones (like Nokia with the 50mp camera).
Why should one use RAW instead of JPEG?
The answer is simple, amount of data. RAW files are usually 12 to 14-bit files, meaning they have 12 or 14-bit colour information, while jpeg has only 8 bits. To clarify, colour information also known as bits, point to the amount of shades the colour can have. 8-bit colour means that there can only be 2^8 shades of the colour spectrum, that is just 256 shades of red, green and blue, respectively. 12-bit colour, for example, means 2^12 shades, summing up to 4,096 shades. A 14-bit image has 16,384 colour shades for each primary colour. Most monitors are 8 bit, therefore you won’t really notice the difference of 8 to 12-bit file but when it comes to print the difference really shows up.
Having more shades mean that the gradients are smoother without any banding, which is really good for portraiture (skin tone) and sky shades on landscapes. Generally, if you can see a gradient it will have banding if it is on 8-bit colour.
Another advantage RAW has is the amount of recovery data passed down from the sensor. Recovery data means that you can use software like Lightroom to recover dark shadows or recover detail in blown highlights. This can be done to much greater extent than it can be done on .jpeg files. The additional information the RAW files has on the image allows for better adjustments, which can go to much further extremes than it can be done on .jpeg.
RAW files will do you the best favour when it comes to white balance since you can change the white balance however you want without any loss of data. It is the same as changing it in the camera, and it looks perfectly natural, which can’t really be done with .jpeg since it just doesn’t work that way.
The extra information RAW files contain can be utilized by many plugins to achieve better noise reduction, better sharpening and significantly better HDR images. With a RAW file, you can even do a single image HDR and it will look as if it were done by bracketed .jpeg files.
Mostly RAW files are about 5 to 10 times larger than their .jpeg counterparts, but that is due to the fact that they don’t have any compression, and with it, no artefacts gained from it. Every single detail is there.
Finally, the RAW files contain all the metadata the camera throws at it, while the .jpeg file often lacks most of it. Every software solution used to process RAW files does that via an external XML file, meaning that it is non-destructive. The RAW file stays untouched, thus making it great for archiving.