Lossless compression
Lossless codecs like FLAC and ALAC find statistical patterns in the audio and store them more efficiently — the same way ZIP shrinks a text file.
Decoding restores the original samples exactly. FLAC typically shrinks WAV to about 50–60% of its size with zero quality loss.
Lossy compression
Lossy codecs like MP3, AAC, and Opus go further by removing parts of the audio your ear is least likely to notice — quiet sounds masked by louder nearby sounds, or frequencies outside the typical human range.
The model behind this is called psychoacoustics. It's why a well-encoded 192 kbps MP3 can sound nearly identical to the original at one-tenth the size.
Bitrate and quality
Bitrate is how many bits per second the encoder uses to describe the audio. Higher bitrate means more detail and a larger file.
Common MP3 bitrates: 96 kbps for voice, 128 kbps as a 'good enough' default, 192 kbps for balanced music, 320 kbps for the highest MP3 quality.
Variable bitrate (VBR) lets the encoder use more bits during complex passages and fewer during simple ones, which usually gives better quality per byte.
The trade-off
Every time you re-encode lossy audio you lose a bit more detail. Always keep a lossless master (WAV or FLAC) when possible, and export to MP3 or AAC only at the final step.