Biography
Fantasy: it's stuff with magic in it, not counting Psychic Powers, or Magic from Technology, or anything meant to frighten, or Magical Realism, or anything strongly religious, or the technology behind the magic that is Magitek, or — where did that clean-cut definition go?
While the core of the fantasy genre is clear enough, there is no succinct definition that encompasses it all. The boundary with Science Fiction is notoriously ambiguous and the boundary with horror is often no less fuzzy. Religiously inspired works, like the Left Behind series, can have a basic good versus evil plotline that would fit well in High Fantasy, but few would place it there. And so on.
Common features of the fantasy genre include:
A secondary world — A world whose connection with our present day world ranges from nominal to non-existent. It could be the remote past or future, or simply a-historical. The inhabitants can be anything from human only, or include other species (or "races" as fantasy likes to call them) of intelligent peoples such as elves, dwarves and orcs. See Standard Fantasy Setting for the, er, standard fantasy setting.
Appeal to a pastoral ideal — Much genre fantasy, of all genres, appeals to the pastoral ideal, one reason for the pseudo-medieval settings. Even urban fantasies will quite often depict cities as blots on the landscape, whose denizens are blinded to what really matters by material ephemera. There are some fantasies, however, which either deliberately take the opposite stance or present a more balanced worldview.
Magic and Powers — Functional Magic is almost always present, though its role in the world can vary widely. It might be either respected, feared, persecuted, or simply not believed in. Its frequency varies from the stuff of legend, through to rare but available to the well connected, up to a ubiquitous part of everyday life. Magitek usually lies at the extreme end of this scale. It may be taught through a master and apprentice system, or in a magical university, when it can be taught at all. When wizards are immortal, they don't need to train successors, and may not be able to.
However, even magic itself isn't a required element, as novels such as Ellen Kushner's Swordspoint, K.J. Parker's Devices And Desires or Ricardo Pinto's The Stone Dance of the Chameleon which feature no magic whatsoever but take place in an alternate, pseudo-historical world, are still classified as fantasy. This is due in part to their widespread use of other tropes associated with fantasy, particularly Low Fantasy. (Swordspoint is an interesting case, because while it contains no supernatural elements in itself, one of its sequels, The Fall of the Kings, is largely concerned with The Magic Comes Back.)
Often placed outside the Fantasy genre, or not marketed as such:
Examples from Mythology, Legends, Fairy Tales, Chivalric Romance, Classic Literature, Romanticism, and Gothic Literature can be seen as precursors to the genre, but are usually excluded.
Demythification: Real-world mythology as semi-mundane history that "inspired the legend". Inverse of Magical Realism.
Magical Realism: In which Fantasy elements intermingle with the realism of a contemporary novel.
Mundane Fantastic: In which Fantasy, Science Fiction, or Superhero elements mix with more naturalistic elements.
Sword and Sandal: Set in a historical period or a Fantasy Counterpart Culture to one. Often ranges from the fantastic to the historically accurate.
Xenofiction: Fiction from a nonhuman (alien or wild animal) perspective.
In response to a flood of inquiries to Ballantine Books from grateful readers of the U.S. edition of J. R. R. Tolkien's monumental The Lord of the Rings, many of whom thought Tolkien had invented this, Lin Carter wrote Imaginary Worlds: The Art of Fantasy, a flawed but still valuable book explaining the origins of fantasy genres (plural) millennia before Tolkien and citing hundreds of authors and titles to guide newcomers. (Carter defined fantasy as literature set in a time and/or place where magic works.) He was also the editor, beginning in 1968, of the Ballantine Adult Fantasy Series which reprinted many out-of-print and older titles, along with new works and anthologies. Ask your grandparents, check online or in used book stores, about this amazing series published under "The Sign of the Unicorn's Head." Jamie Williamson's The Evolution of Modern Fantasy, From Antiquarianism to the Ballantine Adult Fantasy Series may also be helpful.
See also: Maybe Magic, Maybe Mundane, Speculative Fiction Creator Index, and Speculative Fiction Tropes.
Sub-genres:
Comic Fantasy: Includes parodies, fractured fairy tales, and anything that doesn't take itself, its setting, or its tropes too seriously
Dark Fantasy: Fantasy with elements of horror.
Fantastic Noir: A mixture of the Film Noir detective story with the more colorful aspects of fantasy and Science Fiction.
Gaslamp Fantasy: Fantasy with an Alternate History 19th-century setting (or reasonable approximation thereof).
Gunpowder Fantasy: Fantasy settings based on the early modern period, roughly spanning The Renaissance to The Napoleonic Wars.
Heavy Mithril: Fantasy-themed Heavy Metal.
Heroic Fantasy (precursor to Sword & Sorcery): Stories focused on adventuresome heroes and their exploits. Trope Codifier is the Conan stories.
Medieval European Fantasy: Fantasy setting that resembles Medieval Europe.
Spirit Cultivation Genre: Wuxia-inspired genre about individuals cultivating the power behind their Supernatural Martial Arts.
Sword and Sorcery: In the style of early Pulp Magazines.
Wuxia: Chinese Heroic Fantasy, with all the elements. Usually marketed as Lit Fic outside China.
Spirit Cultivation Genre: Chinese High Fantasy, with a focus on immortal heroes with Supernatural Martial Arts and Full-Contact Magic.
High Fantasy (aka Epic Fantasy): Very mythical in tone, focusing on grand adventures, epic deeds, and mostly clear-cut morality. Trope Codifier is The Lord of the Rings (but there were many precursors).
Magical Land: Virtually a sub-genre in itself, and common in works for children. This overlaps with Modern Fantasy.
Mythopoeia Is also an established variant.
Historical Fantasy: A version of the history of our world, but with significant fantasy elements added.
Low Fantasy: Anything not set in our world which isn't one of the others.
Magical Girl: Young female superheroes with magic-based powers.
Science Fantasy: Fantasy that overlaps with Science Fiction; this can also be part of other fantasy subgenres.
Slow Life Fantasy: Fantasy starring a protagonist that ignores greater conflicts for unremarkable concerns.
Urban Fantasy: Fantasy set in modern times, or in imagined settings based primarily on modern society.
Fantasy Works by Creature Focus:
Angel Works: Fantasy works themed around Angels.
Deity Fiction: Fantasy works themed around Gods.
Demon Works: Fantasy works themed around Demons.
Dragon Works: Fantasy works themed around Dragons.
Elf Works: Fantasy works themed around Elves.
Fairy Fiction: Fantasy works themed around Fairies.
Genie Works: Fantasy works themed around Genies.
Ghost Fiction: Fantasy works themed around Ghosts.
Goblin Works: Fantasy works themed around Goblins.
Kaiju Works: Fantasy works themed around Kaijus.
Leprechaun Fiction: Fantasy works themed around Leprechauns.
Mermaid Media: Fantasy works themed around Merfolk.
Mummy Media: Fantasy works themed around Mummies.
Troll Tales: Fictional works about Trolls.
Unicorn Works: Fantasy works themed around Unicorns.
Vampire Fiction: Fantasy works themed around Vampires.
Werebeast Works: Fantasy works themed around Werebeasts
Werewolf Works: Fantasy works themed around Werewolves specifically.
Witch Works: Fantasy works themed around Witches.
Youkai Works: Fantasy works themed around Youkai.
Zombie Stories: Fantasy works themed around Zombies.