My friends and I partied hard over the weekend and, as is their wont given that I am the resident religious extremist, they asked my opinion of the Harry Potter franchise. Some of my Christian friends love it to pieces. Other Christians say the books should be avoided since they condone witchcraft. I think the latter opinion is silly. I don't know of anyone who attempted to fashion an Evil Ring of Power after reading the Lord of the Rings. But this did get me thinking about magic in general in fantasy fiction. I read a lot of fantasy as a boy. My tastes in fiction have since expanded which means I haven't read as many contemporary fantasy novels, so my sense of how magic is used in the field might be out of date.
Basically there are two ways to handle magic-users in fiction. The first way, used in The Lord of the Rings and in the Harry Potter universe, is to portray magic as being innate to the characters. You're either born with the ability to use magic or you're not. Gandalf and Saruman are not actually men but rather more like angels made incarnate. The elves have skills which the hobbits call "magic," although the elves themselves don't know what they mean by the word magic. In the HP universe it's a matter of your genes, just like your hair and eye color. Non-magic parents can have magic-inclined children and vice versa which causes some characters to speak of pure-bloods or "mud-bloods."
The second way is to make magic a technical skill that anyone can master given enough dedication and practice, like swordplay or carpentry. I'm thinking of a gag from Buffy the Vampire Slayer where Xander is thumbing through some volumes of forgotten lore. He reads a sentence out loud which causes a gout of flame to appear. Giles tells him, "Don't speak Latin around the books Xander." It's easier to stray into morally questionable areas with this system as it sometimes means invoking the aid of demonic entities or attempting to bring them under your control.
Here in the real world, from the beginning Christians have always condemned all magic as being from the devil. There is no distinction between white or black magic; attempting to traffic in the arcane arts always means a deal with the devil, period, case closed, even if you have good intentions such as healing someone who is sick. We all know what the road to hell is paved with, am I right? Magic, divinination, astrology, palm reading, and all attempts to communicate with spirits conceal a desire to step outside of God's divine providence. They represent a prideful rejection of God's plan and a desire to manipulate occult forces for our personal gain. There is never an acceptable reason to attempt the use of magic. So if using magic is intrinsically evil, does that mean Christian authors must never portray magic in a positive light in their stories?
Not at all. We can create a pantheon of fantastical gods for a fictional universe without being guilty of the sin of idolatry. There are many ways to handle the issue of magic in fantasy. The first decision to be made is how systematic should your magic be? TvTropes has a good list of different magic types here. What is the context for the existence of magic in your fictional world? Magic isn't necessary for a fantasy setting. And the Christian author can avoid a lot of problems by restricting its use to the villains. I'm of the opinion that magic needs rules but they don't all need to be spelled out in the text. We never get a full explanation of the extent of Gandalf's powers. He seldom uses magic at all. Imagine if he had magically teleported the Fellowship to Mount Doom after the Council of Elrond had concluded. Or if he and Saruman hurled lightning bolts at each other the way an action film hero has a final shootout with the villain. If magic is used too much, then it becomes less a fantastical thing and more about just the way things work.
I like how magic is portrayed in the Warhammer universe: it's wild, dangerous, and you leave yourself open to possession by the Ruinous Powers if you use it too much.