The easiest way to understand modern codecs is to look at the most common one in use today and the one most other codecs are based on, H264:
Since then, several codecs have been developed and are in use (HEVC, VVC, AV1, EVC, etc). A big problem arose with licensing. As codecs became more...