Lossless compression (ZIP-style algorithms, PNG, FLAC) is reversible: decompress and you get bit-identical data. Lossy compression (JPEG, most video) permanently discards information — arranged to discard what human perception misses first — achieving 5–20× better ratios.
In PDF terms: text is always compressed losslessly (nobody accepts altered letters), images can go either way. JPEG quality 80 typically halves file size versus quality 95 with little visible change; below ~60, artifacts appear around high-contrast edges — the classic "JPEG fuzz".
The compression decision is really a purpose decision: an archival master stays lossless; an email attachment goes lossy until it fits under the limit. Smart compressors iterate the lossy knob (image quality) until the file lands on target — which is how exact-KB compression presets work.