I recently had a nightmare trying to play some AVI files as part of a presentation, and after some research realized that just because a media player claims to play AVI files, it may not necessarily have the correct codec to play it. In few words, a media file can be encoded any way you like (information in the file's header itself), which is where codecs come into the picture.
For these particular AVI files, none of the programs I tried (including Windows Media Player, Real, WinDVD, Winamp) could play the files on two machines I tried, yet they play on my machines back home. At best, these media players played only the audio of the files.
Finally, I discovered a small tool called GSpot (Download) which allows you to view the actual encoding on a media file and tells you which codecs you need to view the file, in addition to checking the integrity of the file. Although my files were AVI files and the programs I tried claimed to support them, none had the xvid codec with which it was encoded. In GSpot, after you read in the file, under the video section is a 'codec' field that reports this information.
Then you can google for the particular codec you need. I found my xvid codec at xvid.org, and after downloading and installing it, all my media programs are now able to play the AVI files on these computers. If you download a lot of media files, this is actually a good codec to have installed. Most programs that create the most popular video clips on the web or torrents use this encoding because of its efficiency in compressing videos, in addition to being cross-platform (works on Windows as well as Linux variants and Mac).