Dungeons & Dragons is a versatile game, with a comprehensive fantasy adventure framework that can sustain a lot of different types of games. Of course, with its robust spellcasting rules and classic sword and sorcery archetypes, high fantasy is generally the most appropriate flavor for a D&D campaign.