I just realized you have an Intel Mac, which changes the picture. You'll need a universal binary codec, and in the case of Divx, it hasn't been officially released. However, there is a
Divx beta that is universal you can try.
What your friend told you is essentially correct, avi's are just wrapper files that contain both a video and audio codec of the original encoder's choosing. If you don't have the codec(s) on your system, you're sol. Normally, Divx can handle most of them, but it isn't bulletproof. If someone uses an obsolete or otherwise bizarre codec, it may be difficult to find a suitable decoder. VLC has a library of various codecs that it uses for avi playback, which is why it is practically bulletproof for avi playback.