All of them - Xvid, Divx, X264, WMV_6-9 - are MPEG-4 implementations.
MPEG is a standard, MPEG-1 was video CD, MPEG-2 DVD and SVCD.
DivX 3.11, the olden pirate codec was hacked from the MS Windows Media Wideo implementation of the MPEG-4 standard. The reason was, that MS only allowed you to convert files into their own properiety format, with no backwards compatibility (you could no longer extract that data) and that their encoder reeked like unwashed monkey balls. (In my golden otaku years I had some videos in that format (WMV), and it was an experience on and onto itself....like a trip through hell tied to a vogon literary chair.)
So DivX 3.11 was pretty much a pirated piece of software used by anyone without remorse.
Xvid was an opensource implementation from the start, and fully legit.
DivX has gone legal only later on, and while initially the format was ahead of Xvid, now they have fallen behind the development curve.
Xvid is a solid implementation at least on par with DivX, though it wasn't made for hacks with no knowledge of encoding, so you actually have a pretty detailed control panel for fine tuning it. (Whereas DivX, ala MS tries to shuffle all the works under a magic carpet with bright lilly signs that makes it all the more akward to use in my experience than helpful.)
X264 codecs are the newest on the scene, and offer the best in quality and filesize, but they trade it for processing power.
WMV-9 is on par with X264 quality wise, but compared to the opensource (or closed source) formats is still hard to work with, as the format is still extremely restrictive in terms of backward compatibilty or platform idependence.
MS also never really recovered from falling behind when DivX 3.11 appeared on the scene, though their agressive marketing and indoctrination of users has made a big percentage of people use their built-in tools for encoding their video.