In my opinion, if we're going to have some kind of magic system, it had to be a bit like Tolkien's. As Aquillion said, magic works well as a backstory - behind the scenes, as a subtle power, instead of something everyday like in Harry Potter. Artifacts are already the kind of "magic" I'm talking about, so are curses. They could be expanded, though. Cursed artifacts? Some kind of reverse-werecurse, a blessing from the deity?
Demons are magic users. They are just magical power that is binded in physical form, I believe. After all, if they're locked behind candy, who locked them there? There was a battle of gods. Adamantine, the most magical metal, was created to contain demonic powers. If demons had a powers to bend the wills of the others, craft cursed artifacts during worldgen and teach these skills to others, adamantine could have awesome powers against "magical" things. Of course there would probably be other kinds of "good" magic, too, since adamantine is pretty rare - but I guess it all is about artifacts. Phantom713 threw some exceptional examples of magical artifacts.
Hey, an idea from The Silmarillion: The Songs of Power. You'll find many north european epics where the heroes fight by singing a songs of magic - not exactly spells, but a songs, which contain power. The wills of the fighters fight in their songs.
He (Sauron) chanted a song of wizardry,
Of piercing, opening, of treachery,
Revealing, uncovering, betraying.
Then sudden Felagund (Galadriel's brother) there swaying
sang in answer a song of staying,
Resisting, battling against power,
Of secrets kept, strength like a tower,
And trust unbroken, freedom, escape;
Of changing and of shifting shape,
Of snares eluded, broken traps,
The prison opening, the chain that snaps,
Backwards and forwards swayed their song.
Reeling and foundering, as ever more strong
The chanting swelled, Felagund fought,
And all the magic and might he brought,
Of Elvenesse into his words.
Now THAT'S how magical battle in DF should go. Not pre-learned spells but simple "power of soul" or willpower sung into magical form. There are many examples of different songs of power - making enemies sleep with singing, breaking buildings with voice etc. Of course it would need training, magical attributes or artifacts to be able to use such things.
Let's get back to artifacts. Artifacts maybe should be rarer but even more powerful than they're now - what if, for example, the creator of the artifact really poured part of his soul (or cruelty and malice!) into the artifact, thus explaining why the item has such powers and why they can't be mass-produced. If a cheesemaker crafts an artifact sock, that sock might give legendary cheesemaking abilities to anybody who's wearing it. Then during history, an awesome hero wearing that sock might encounter a powerful demon, who would curse the sock - anybody wearing it would crave for cheese eternally without rest.
After artifacts really matter in history this becomes much more relevant, but we already have goals, like becoming immortal. So somebody might have a goal of finding particular artifact. Some artifacts might be heirlooms of the kingdoms. There could be wars for artifacts.
Again, because I can't help my inner Tolkien nerd, I'll have to throw an examples from his books:
Did you know that Narsil, Elendil's sword, which was later reforged as Andúril, Aragorn's sword, was actually a dwarven artifact? Master-smith Telchar of Belegost forged it. It was a damn long sword with unimaginable sharpness. It shined the light of the moon and the Sun, striking an unnatural fear into the hearts of its enemies. There are many more Tolkien artifacts, but they're mostly First Age so not many are familar with them. Oh, where was I? Oh, Dwarf Fortress Magic.
How about Gandalf-like magic, then? Well, technically Gandalf was a spirit bound in physical form, just like Sauron, or balrogs. He was sent to Middle Earth by "deities" to help in battle against Sauron - so, I don't see why DF deities couldn't also help individuals directly, if the situation was too dire - for example, a demon-led civilziation has nearly enslaved all of the world, so a mystic figure appears and starts to gather resistance around himself, finally leading to overthrowing of the dark lord. Or maybe the dark lord just crushes him. With a loinchloth. While riding a badger.
My point is that magic shouldn't be "learned" from nothing - not schools teaching spells of fireballs or books telling how to teleport, no. Magic is either learned through other magic-users spreading their magical powers (thus one slab can't give powers to 1,000 people - since the slab spreads the magic, divides the magic, its magic would eventually be drunk to zero, with magical potential poured into the minds of people) or through artifacts, which contain a parts of their creator's soul and will. Power of magic is same as power of will and other mental traits that are linked to certain magic - for example, if one tries to enslave others under his will, he'll need willpower and probably dominating personality. Magic should be rare and powerful, not everyday thing.