COder DECoder
basically, codecs are software used to decode video to be played, or encode video to be recorded.
MOdulator DEModulator
they convert (modulate) digital signals into analogue signals to be sent over a phone line.
they also convert (demodulate) the analogue signals back to digital signals that come from the phone line.
This is how modems communicate.
Although when you see a cable modem, or DSL/ADSL modem, they aren't really modem's. they only send and recieve digital signals. they don't convert from digital to analogue, or vice versa.
the name modem is used, basically for consistency.
a CODEC and a MODEM are really completely different things, although they do one similar thing: convert one thing to another, and back again.