Open up Windows Media Player, click on Tools then "Options...". Now click on the "File Types" tab and make sure the "Windows video file (avi)" box is checked. Shut down Media Player and trying playing the .avi file again.
If this doesn't work, can I ask where you got the .avi file from? If you downloaded it from a peer-to-peer network, it could well be a fake .avi file (not a movie file at all, but a virus disguised as a movie file). Try and get hold of something that you know is a genuine .avi file (have a friend e-mail you one or put one on a disk for you) and try playing it on your computer.