If you’ve downloaded or were sent an AVI file you may be surprised to find it won’t play on your Mac. This is because Quicktime (the default macOS media player) doesn’t support all of the compression formats used by AVI (due to AVI being a format developed by Microsoft). It supports MJPEG, but not MPEG-1, MPEG-2, DivX, XviD, or WMV. Therefore it’s entirely possible that you might get some AVI videos that play on Quicktime and others that won’t.
There used to be a Quicktime plugin called Perian which simply added full AVI support to Quicktime. Unfortunately however the developers have stopped updating the plugin which means it isn’t compatible with the latest versions of macOS. If you run an older version of macOS and would like to try it out Perian can be downloaded here.
For everyone else who is using a recent version of macOS the best option is to just download an alternative media player. VLC is a popular and solid option, it’s open-source and free to download from the developer’s website. VLC effectively plays everything, including all AVI formats.
If you’re after a more polished and refined media player for your Mac you might consider checking out Elmedia Player from Eltima. This media player has a free version and a paid version, and offers features such as Airplay support, Chromecast streaming, watching & downloading videos directly from YouTube and more. You can find the free version here and the paid version here.