By default Windows Media Player can’t play .avi files. This is because the codecs needed to play the .avi files are not installed on Windows by default. The simple solution to fix this issue is to install the necessary codecs.
If you just want to play just the .avi files, then you can download and install divx codecs. Once installed, there should be no problem in playing the avi files with Windows media player.
If, however, you want to play almost any kind of media files easily, then you should download and install K-Lite Codec Pack. K-Lite Codec Pack is a collection of hundreds of codecs and media tools. With K-Lite Codec Pack installed, you can basically play anything that you download from the internet.