Codec is a portmanteau combining the words “coder” and “decoder.” A codec is a specification that describes a method for representing information. In digital media, codec typically refers to a method of encoding audio, video (and sometimes text and other metadata) in a compact fashion for transmission and storage.
Codecs may be lossless, where the decoder is capable of reproducing the original content exactly, or lossy, where the decoder can only reproduce an approximation of the original content. Lossy codecs use significantly less storage and bandwidth, but produce lower fidelity media.
The word codec is sometimes used to describe a specific implementation of a coder or decoder. x264, for example, is an encoder implementation of the H.264 video compression standard.