There are two types of magic in the world of Krynn, the Arcane and the Divine. Both of them spring from the source of mana from Chaos and are channeled differently by Wizards or Clerics.
It is given by the three moon deities of magic; Solinari, Lunitari and Nuitari. During the Age of Mortal, the Knights of Neraka in the Order of Thorn learned to use Arcane magic from Takhisis.
It is the powers of the deities, as channeled by the Clerics. The moon deities never grant that kind of power.
During the Age of Mortals, magic was deeply reshaped. Wizards discovered the power of Wild Magic and Clerics discovered the power of the heart.