Almost any photographic expert will tell you that you should shoot RAW files not JPEGs, and that RAW files are innately superior. The trouble with this kind of wisdom is that it’s repeated and passed on without question.
Lossy/lossless compression
Digital images are usually compressed in some way to produce smaller and more manageable files, and this compression comes in two types. Lossy compression is the most aggressive and does involve the loss of some image detail, though this is rarely visible. It's used for JPEG images and some RAW files. Lossless compression simple takes up the 'spare space' in the image file and doesn't discard any data, but the reductions in file size are smaller. TIFF files use lossless compression, as do some RAW file formats.
RAW files explained
Many photographers prefer to work with RAW files – but what are they, how do you work with them, and why are they so much better than regular in-camera JPEGs?