Yeah, a lot of people have the wrong idea about that. Dungeons & Dragons is a set of rules for running a particular kind of game, with a number of published settings associated with it, few of which resemble the generic Tolkien pastiche most folks picture when they see that it’s got elves and hobbits in it.
In the same order as the previous post:
Planescape is set in an industrialised quasi-Victorian city constructed around the inner rim of a giant ring hovering atop an infinitely tall spire at the centre of the universe. The streets are ruled by warring gangs of philosophers who can literally argue you to death. Playable races include anarchist goat-centaurs and sapient geometric shapes.
Dragonlance is basically medieval fantasy meets World War II, wracked by constant open war between the forces of Light and Darkness. Knights ride dragons into battle while sinister dragon-men prowl the countryside (there are a lot of different kinds of dragons). Playable races include steampunk gnomes and musical minotaurs.
(If that last bit sounds familiar, it’s because most of what World of Warcraft didn’t borrow from Warhammer, it lifted from Dragonlance).
Ravenloftis pretty much as described in the previous post: it’s a prison dimension for the multiverse’s worst baddies, which has evolved into a confederation of dystopian city-states ruled by thinly disguised expies of various Hammer horror villains, like Dracula and the Wolfman. And also an evil version of Pinocchio, because why the hell not?
Spelljammer is D&D in space, where enchanted galleons sail the luminiferous aether in search of fortune and adventure. If you’ve seen Treasure Planet, you’ve got the right basic idea, though Spelljammer predates Treasure Planet by some decades. Standout features include mercenary hippo-men and gnomes whose ships are powered by giant hamsters running on wheels.
The Forgotten Realms is probably the closest to what folks are picturing when they think of “generic fantasy land”, though they’re a couple of decades off with respect to its inspirations - it’s much more 1980s romantic fantasy than 1960s epic fantasy. Talking housecats, cosmopolitan cities with suspiciously modern amenities, enlightened matriarchies ruled by beautiful sorcerer-queens - you know the drill if you’ve read your Lackey.
Dark Sun is a post-apocalyptic milieu set in the wake of a global environmental collapse brought about by irresponsible use of magic. “Mad Max with wizards” would be a glib but not-wholly-inaccurate description. Playable races include savage cannibal hobbits and giant psychic praying mantises.
Birthright assumes that the player characters are members of ancient ruling houses empowered by the blood of slain gods. Beyond that, it’s almost entirely generic - its whole shtick is that you get to rule a domain right from first level, rather than having to work your way up to it.
Red Steel is an Age of Sail swashbuckling game set on the Savage Coast, a region tainted by magical fallout that grants wondrous powers, but also induces progressively more hideous mutations. The economy is based on the eponymous red steel, a rare metal that grants resistance to the mutations without suppressing the accompanying powers. I wasn’t kidding when I said The Three Musketeers meets the X-Men.
Eberron is a “magipunk” setting that envisions a high fantasy world in the process of undergoing an industrial revolution. Trains powered by bound lightning elementals crisscross the land, and one of the major tensions involves the integration into society of a race of mechanical soldiers constructed from enchanted wood to fight in a recently ended war.
Greyhawk is tough to pin down, as it’s basically the collected campaign notes of one of the game’s original designers. It covers a lot of ground, but the focal point, the eponymous city of Greyhawk, is a straight up sword-and-sorcery pastiche. In terms of inspirations, think Robert Howard, Fritz Leiber and Michael Moorcock. Sinister cults, baroque cities ruled by degenerate nobles, and player characters who are as likely to be planning urban heists as delving dungeons.