Fantasy fiction always revolves around magic or some other kind of supernatural force.
Thinking back to how I defined science fiction, you could say that magic or the supernatural is the “disruptive technology” of the fantasy genre. This power can manifest itself in certain objects (the ring of power in The Lord of the Rings), places (the Overlook hotel in The Shining) or people (Harry Potter), or it may permeate the entire universe, accessible to everyone or, more often, to a chosen few who have either been born with the ability to tap into it or else devoted their lives to learning how master it (The Wheel of Time series).
Like the technology in sci-fi stories, the entire world is shaped by the presence of this magical power and those who control it. However, unlike sci-fi stories, in fantasy worlds, the laws of physics are given pretty short shrift with no explanation offered or required.
Not surprisingly, the conflict in fantasy stories revolves around gaining control of or destroying the supernatural force at the heart of the story before it falls into the wrong hands—or before the force, itself, gains control of the world. This battle can take many forms, such as a quest to capture or destroy a magical object, to open or close a doorway between two worlds, an exorcism or a battle between two masters of magic. As with sci-fi, the denizens of the fantasy world often pay a horrible price before the dark powers are defeated and order restored.
Like their sci-fi cousins, fantasy stories can also serve as a powerful form of social commentary. However, rather than focus on our ambivalence toward technology, they can serve as metaphors to explore all sorts of other issues, such as the environment, racism, war and the very nature of reality.
Can the two ever be combined?
Yes, but proceed cautiously.
As I noted previously, Star Wars is a great example of how sci-fi and fantasy can be brought together in an innovative and engaging way. But merging the two genres in this fashion is always a risky venture. And not even George Lucas manages to evade the thorny issues involved.
The problem with combining sci-fi and fantasy is that while the power of sci-fi is explanation—a revelation of how the technology at the core of the story actually works—what makes fantasy so appealing is mystery.
Going back to Star Wars, we don’t want a scientific explanation of how the Force works, which is what George Lucas attempted to give us in his latter three films. We just want to know whether Luke will be able to master the force in time to defeat Darth Vader and the Emperor. Once the characters start talking about midi-chlorians, all of the mystery that made the Force (and the Star Wars universe) so appealing melts away.
As you can see, distinguishing between sci-fi and fantasy is far more than a mere intellectual exercise. A rare individual may be able to combine the two, but chances are you are not that person! Instead, it’s much wiser to choose one genre or the other and then remain true to its conventions throughout. That doesn’t mean you can’t subvert those conventions and/or employ them in new and innovative ways. But each genre has evolved in a certain direction for a reason. So rather than try to force a genre to perform a task it was never designed to carry out, design your story in such a way that it will exploit your chosen genre’s strengths rather than reveal its weaknesses.