There is no single codec for movies that have .avi extensions. AVI is a container format, not a specific type of file. An AVI movie may use one of the Indeo codecs (there are at least four that I'm aware of, none of which have been ported to Mac OS X) or one of the various flavors of DivX, among other possibilities. You'll have to find out what codec was used for the movies you want to view to determine what you need. Note that not all codecs for the various .avi movies are available for QuickTime.
If you want to try "hit and miss", Perian, which rolls several codecs into one package, might work. If not, you can try the codecs at http://www.divx.com/ and http://www.3ivx.com/ and see if one of them will work for you. Do not install both Perian and the DiVX/3iVX codecs at the same time.
If you just want to play the movie any way you can, you can also give this player a try: