According to Wikipedia, a codec is a program that encodes and decodes a digital data stream. You might have seen the extensions like mp3, WMA etc., at the end of an audio file name and mp4, MKV, WMV, etc., on a video file name. These extensions are called containers, and these contain codecs.