Codecs are either a device or programme for the encoding and decoding of audio streams. The word Codec itself is a portmanteau word in that it came about through the shortening and combining of the two words coder and decoder. Codecs are essential for converting analog information into digital information and then reassembling the information again. E.g. when making a telephone call via VoIP, a codec will encode your voice (analog) into digital and then decode it again so other callers can here your voice.
For more on codecs please refer to Audio Encoding