Minecraft wiki entry for Dungeon, associated text: Dungeons are the earliest added generated structures that still exist in the game today.
A contradiction exists in Java Edition that even though the "Generate Structures" world creation option listed "Villages, dungeons etc." as two example structures that are supposed to generate only when the option is turned "ON", dungeons generate even if the option is set to "OFF".
Dungeons are always connected to a cavern or other structure, although it's possible for the dungeon itself to overwrite most of a tiny cave.
It is possible, though rare, to find connected dungeons with multiple spawners and extra chests.
It is extremely rare for a dungeon to generate at bedrock level. When this occurs, the bedrock cuts through the dungeon and can prevent the chests or the spawner from generating. Because the air below Y=11 replaces itself with lava, this cannot happen in caves. However, it can happen in mineshafts.
Dungeons are the only structure with chest loot that cannot be located using the /locate command.
Unlike most other generated structures that generate in positions determined by world seed, dungeons are generated in a very different way by performing checks per chunk, as mentioned above, similar to how trees are generated. As a result, they can, in a way, be considered "underground trees".