There are two main categories of digital audio file: PCM (Pulse Code Modulation) such as AIFF (Audio Interchange File Format) or WAV (Waveform Audio File Format), and Data Compressed, such as MP3 or FLAC.
With PCM, audio is represented as the raw numbers that the AD converter presents to a recording system, or the numbers the DAW created in its virtual mixer. No further processing is introduced, no further modification to the audio date is made – making these file types ideal for exporting a mix at the highest quality you can.
Data-compressed formats, such as MP3s, reduce the amount of data in the file, making them easy to email or share over devices. This is achieved by either encoding it in a more efficient manner than PCM but retaining the exact amount of detail (known as ‘lossless’), or by throwing away data that the system believes we won't miss (known as ‘lossy’).
Lossless formats such as FLAC and Apple Lossless do not degrade data. They decode to the same stream of numbers as the original PCM data, in much the same way that ‘zipping’ and ‘unzipping’ data gives you an identical file. The amount of data reduction in these formats is relatively small, up to about 50%.
Best practice is to retain precious recordings in PCM or lossless format, and to only use compressed formats when sharing music. Should you need to produce a higher quality file later, you can always return to your source material safe in the knowledge that all the detail is still there.