A codec is a piece of software
It's actually a kind of abbreviation for compression and decompression. If a file is compressed that becomes smaller, when decompressing the file is extracted again and it is its original size. Usually one talks about a codec when it comes to sound or video. When you watch a video and you only have sound and a black image, chances are you don't have the correct codec installed.
There are also a lot of downloads available that contain the most common codecs, so you only have to download and install something once. K-Lite Codec Pack is an example of this.