Codec
Coder–decoder: a pair of algorithms that compresses audio or video on capture and unpacks it on playback.
Lossy codecs (MP3, AAC, H.264) discard information the ear or eye would not register anyway, reaching enormous compression ratios. Lossless ones (FLAC, PNG) reproduce the original exactly but compress far less.
Do not confuse a codec with a container: MP4, MKV and WebM are containers that can hold various codecs. The recurring headache is patents — hence the free alternatives Opus, VP9 and AV1.