Most fantasy can be divided into either real-world or off-world fantasy (sometimes called second world fantasy). The distinction is obvious: real-world fantasy takes place in the “real world” (so most urban and contemporary fantasy, as well as things like historical fantasy/alternative history) and off-world fantasy takes place on a different world of the author’s own creation.
(You run into problems where some fantasy looks like off-world fantasy at first, but it’s supposed to be our current world after some apocalypse in the future, which puts you into science fantasy or pure science fiction territory. The entire thing is a mess.)
Off-world fantasy is attractive to authors because it allows them to create their own world with their own rules, their own histories, and their own cultures. Most epic fantasy is also off-world fantasy. Everything from Howl’s Moving Castle to George R.R. Martin’s Game of Thrones is off-world fantasy.
The worlds can be patterned after a time period or a culture here on Earth or they can be something completely of the author’s devising.
You also find books that are both real-world and off-world, often where the characters start in one and go to the other. Usually it’s from real-world to off-world, ala Narnia, but sometimes it goes the other way as well. (Disney’s Enchanted, for example, goes from fantasy to real world, and the 10th Kingdom jumps back and forth between its two worlds constantly.)
As a reader, do you prefer real-world fantasy to off-world? If you are a fantasy writer, what are your opinions on off-world fantasy?