The general difference between an endec (encoder/decoder) and a codec (compressor/decompressor) is that hardware is usually considered to be an endec, while software is considered to be the codec. Similarly, the word "encoding" is usually used for hardware, while "coding" is usually used in regard to software.
A program (or hardware) which uses a compression algorithm to create MPEG audio and/or video is often called an encoder, and one which plays back such files is a decoder. However, this is technically a codec, especially if performed in software.
Examples of encoders, decoders, and endecs:
Other things which are encoded or decoded: