I'll go with system. In no particular order, D&D is:
1. Strong archetypical characters working together: at minimum fighting man, magic user, and cleric are necessary.
2. Vancian magic and spell levels.
3. Armor reducing chance to be hit, as opposed to absorbing damage. Armor options must include at minimum: unarmored, leather, chain, plate, and shield with any of the above.
4. Divine magic separate from arcane magic.
5. Alignment, whether it be one axis or two.
6. Six ability scores, typically rolled on 3d6.
7. Silliness inherent in many monsters: owlbears, gelatinous cubes, the bullette, the rust monster.
8. Class based and level based.
9. Hit dice, which will cap at name level or the equivalent.
10. Races include at least human, dwarf, elf, and halfling. Races need not be separate from classes.
11. Flavor of the rules based heavily on early to middle 20th century sword and sorcery and high fantasy writing.
12. D&D is organic; if you leave out a couple of these, you can still argue you are playing D&D.
Setting, however, doesn't seem to matter much at all. Blackmoor is gone, the Known World is gone, and look what they did to Greyhawk. Only a handful DM's are still building the megadungeon settings that this game was founded on. All that said, most players (maybe not most of the people on this thread, however) will agree that even WoTC's d20 fantasy game is still a form of D&D.