CoDec is a Coder-Decoder, while MoDem is a Modulator-Demodulator. Coding involves replacing parts of a signal with "codes" or a predefined set of symbols. This requires a decoder that converts the codes back to the message. Modulating however involves changing a carrier signal according to a message signal, and it requires a demodulator to recover the original message. Both can be found in PCs where a modem can connect you to the internet (by modulating your digital data into analog signals on the telephone line) and codec softwares that can read different types of media files (encoded in a certain format or using a certain code like mp3 or mpeg).
MODEM is an acronym for modulate and demodulate frequencys - this actually started many years back. AT&T installed the newly invented coaxial cable in 1940's across the US. By creating various frequencies on the cable they could transmit many phone calls at once on one copper line. To do this they modulated the frequency on one end then demodulated the frequency on the other end.
CODEC compression decompression is similar; however it relates to software uses, not frequency. This is an digital algorithm created to do on the fly compression for a particular audio / video / data purpose. Many of our online movies use some type of a CODEC, video cards are also commonly using CODEC. Just a very simple look but hope it helps.
Dear Qasim Rizwi, A ‘modem’ is a hardware that communicates over a digital or analog medium being an interface to the computer. Whereas, ‘codec’ is a software key which tells computer to transmit data. While I was at Aligarh Muslim University, faculty members used to sit in the department’s tea club and those talks/chats are still in my mind. In one of the such chat, Late, Professor M. N. Farouqui (former vice-chancellor of the university, who was also an instructor in department of Electronics Engineering ) differentiated ‘Modem’ and ‘Codec’ as saying “like your mouth and ears and the codec is the part of the brain that 'understands' what you are hearing. “How one can forget such “life long learning”.
but I am still confused with the "hardware CODEC". I'd like to quote a short text below from "Computer Networks 5th edition" by Mr. Tanenbaum.
"The analog signals are digitized in the end office by a device called a codec...(next paragraph)This technique is called PCM(Pulse Code Modulation). It forms the heart of the modern telephone system."(quoted from Chapter 2.6.4 "Trunks and Multiplexing")
It seems the "hardware CODEC" also uses a modulation method to "modulate"(maybe the word "encode" will be more proper, but there is a method called PCM.) the analog signal to digital signal, which makes the concept more ambiguous.
The only difference I can figure out is there is no carrier wave in analog side of CODEC while there may be one in MODEM. However, I'm not sure if this opinion is correct.