Just after the first humans appeared on the Disc, wizards looked at their situation and said "bugger this". They blamed the Gods and waged war against them, using the magic lying around. They did so much damage that the Olden Ones intervened and made sure smaller and less powerful humans lived upon the Disc.
In the time of the Mage Wars, magic on the disc was generally much newer and more powerful than it is in the time of the Discworld Books. In this period of Wild Magic, it seems that any entity that had a penchant for gaining power could harness the plentiful and powerful Wild Magic. Early Mages could and would build entire structures out of pure magic, citadels of power as monuments to themselves. Other creatures, notably Noble dragons, Gods, and the Ice Giants, would make extensive use of the plentiful power. Envy and greed soon caused the powerful entities to turn on one another, forming alliances and then betraying them while using the Wild Magic to attack each other as well as providing formidable defenses against similar attacks. The resulting period of outright and total chaos and war caused the very geography of the Disc to be altered. Even today, areas of the Disc show the scars and after-effects of the magical war.
But the Wild Magic wasn't truly limitless; only a few sources that were able to actually create new magic existed, and some of these (especially The Sourcerers; eighth sons of powerful wizards, who were themselves eighth sons of eighth sons) were the center of some of the most intense fighting. Although Sourcerers were formidable beings, they were not actually immortal, and the endless attacks upon them inevitably caused their demise.
With the number of sources of new magic dwindling, the power began to dwindle. The Wild Magic became tame, recycled until it was but a shadow of its former might. The remaining Wizards formed the Unseen University, originally an institution for the teaching of magic, but later devoted to learning how NOT to use magic, lest the remaining power became even more watered down. Much of the Lore of Magic espoused by the UU is a direct result of the terrible Mage Wars. For example, the tradition that Wizards remain celibate is given the overt reason that sex somehow reduces a Wizard's magical prowess, but is really because the rise of a new Sourcerer is still possible, but the resultant influx of Wild Magic into the world and resultant magical warfare is too terrible to contemplate.
Some magical materials, like Sapient pearwood, owe their existence to the Mage Wars; they are found in places where early spells hit. These areas make reality change - Rincewind realises that they are in one in the The Colour of Magic when he flips seven coins; four land on edge and one turns into a caterpillar. The residual Magic in such areas causes the local flora, fauna and sometimes even the stones to have concentrations of still-powerful magic. This means that such materials are in high demand by Wizards, and artifacts made of them can be quite powerful indeed. However, the results can be unpredictable; The Luggage, which is made from Sapient Pearwood is a good example.