First, what distribution are you using? You should include it in your profile.
Second, codecs like mp3 and divx have patent issues, so most distributions can't include them by default. It's up to the individual user to do so.
As a result, this is a very commonly asked question that has been answered many times (particularly for mp3). Try searching this site and google. Usually you just have to activate a special repository and install a few packages, but each distro has different requirements.
You probably need libmad and/or liblame for mp3, and maybe ffmpeg/libavformat/libavcodec for divx, but that depends on the media player you're using.