If a non-fan on the street were to be asked to identify the difference between fantasy and science fiction in literature, his answer would most likely be simple: fantasy has magic, science fiction has futuristic technology. At this point, the purists howl and begin recounting their favorite critical essays on the range of speculative fiction and its numinous boundaries. But the very bedrock of both genres ultimately come down to something very like this in the minds of the reading public and even the minds of many fans. For the purposes of this article, let us assume that a fantasy story contains some aspect of the magical that forms an important part of the story.
This next step in a survey of the fantasy genre today must address the vastly different roles magic plays in the fabric of these stories. In some, it is somewhere in the background, a mysterious feature of a world shrouded in wonder. Often, it is a well-known (if only to a select few) force to be mastered as any other rational discipline. Sometimes, it is a loophole or gimmick in the fabric of the universe, a secret to be exploited for good or evil ends.
For a person concerned with meaning and symbol, it is important to think critically about the role magic plays in the fantasy story. Its function in terms of its place in the world matters as much as its function in the story. For a detailed essay into the facets and dangers implicit in the use of magic in stories, read Steven Greydanus' essay Magic, Middle-Earth, Muggles, and Meaning.
With that treatise out of the way, let's delve into the different ways magic is often treated in the modern fantasy literature:
Magic-as-science and economies of magic: This seems to be the favorite and most widespread these days. With a culture saturated in modern scientism, the logical place for magic is with the physical sciences. It becomes another force that can be harnessed just like electromagnetism, gravity, or chemistry. In this sort of role, the wizard is merely a technologist with access to power that can manipulate the world into doing his bidding.
These stories are only superficially different from science fiction, since much of the narrative is often devoted to the exposition of how the magic functions and how the process is learned and mastered. The quintessential version of this is Jordan's Wheel of Time series. In it, some unique individuals can control "the weave" which is essentially a psionic or magical manipulation of a well-defined physical force. It is certainly considered to be a form of magic by readers, but it is also a form of science due to its predictable and rational function. Other examples are Eddings' the Will and the Word, and even Star Wars' Force.
Often, in the most well-developed of these stories, the methods and origins of magic become resources to be managed using the science of economics. When this is the case, sometimes it becomes a thinly-veiled environmentalism in stories where magic is depleted by careless magicians or the natural world polluted by over-use of magic.
Magic gimmicks: there is a vast array of stories whose entire content consists of a single magical gimmick around which the world is built. The gimmick seems usually to be the result of an elaborate what-if question pursued on the part of the author. Once the question is asked, the story then becomes an exercise to explore the usual hero myth. Here, the structure of the story revolves around the nuances of the gimmick, which provides sources of conflict and resolution. An example of this is David Farland's Runelords series. In these stories, the gimmick revolves around the question, What if a person's attributes could be stolen and "branded" onto someone else?
Magic as horror: in certain traditions of fantasy, magic remains an aloof, dangerous, and supernatural component of an otherwise realistic world. Here, magic is associated with the demonic or the underworld and those who practice it are members of arcane cabals or insane dabblers in things Man Was Not Meant To Know. Examples of this include anything written by H. P. Lovecraft and most sword and sorcery (Robert E. Howard's Conan).
A similar relation to this category would include magic as occultism-made-real. In such stories, the traditional occult elements such as alchemy, hexes, and crystal balls have the powers claimed of them in medieval and other real-world time periods. In many of these stories, the magical elements remain associated with horror and the supernatural. In others, it is associated with the popular gothic culture and is seen in a retro-revisionist way such that it remains dark and appealing but not quite evil. In still others, (J. K. Rowling comes to mind) it remains tentatively neutral.
Magic as mystery: in a very few of these stories, magic remains a part of the world but is a distant, dreamy element - sometimes good and sometimes evil - and always mysterious and poorly understood (at least by the protagonist). These stories seem usually to draw on old faerie traditions and sometimes stray into territory better named supernatural fiction. In these stories, the operations of magic are rarely predictable, friendly, or neutral. They are most often in the service of enigmatic beings and beyond the ken of mortal man. A good example of this is Lord Dunsany's The King of Elfland's Daughter and much of the modern urban fantasy (such as Charles de Lint).
Magic as deep structure: in some few stories, magic becomes more than any of these other things. It is found in the story as something of wonder, something beyond the grasp of mortals, but something very much a part of the world. It transcends the limited purview of faerie traditions, the spirit world, or conventional supernatural categories. Somehow, magic is at once a part of the mortal experience and beyond his grasp or control. The best example of this sort of magic is that embodied in Tolkein's Middle-Earth. It is seen elsewhere in Wangerin's The Book of the Dun Cow, Lewis' Narnia, and even in Eddison's the Worm Ouroboros.
As far as I am concerned, as both a reader and a writer of fantasy fiction, I usually prefer the last two or three items on the list. Very seldom does magic-as-science appeal to me, and I rarely want to explore the what-if scenarios involved with magic-as-gimmick. Sometimes, the horror elements and the freakish scenarios imagined by Lovecraft and his literary brethren fascinate my imagination, but I admit that I find their appeal too limited for a steady diet.
I nearly always prefer magic to be wondrous, mysterious, something that offers a glimpse of a world and power beyond the reach of humanity. Magic ought to touch on the numinous, bridging the world we know and leading us to a brief glimpse of a wider reality. Not one hidden in secrecy like the Gnostic worlds of Dan Brown, but one of a deeper, truer reality all around us but barely perceived and often forgotten or denied. It is these worlds that I enjoy best of all: beatific vistas, mythic worlds that offer a window to a wider, fuller world in which the immediate reality of our world is seen in a radical new light.