Not to be confused with the dungeon branch The Vaults.
The term vault refers to any dungeon feature that is not part of the dungeon's normal layout. Vaults generally have a fixed layout, though many include random items or monsters, and some (notably Xom's altar vault) randomize the terrain as well.
How do I recognize a vault?
Vaults can often be spotted as areas on a level that don't match the level's theme, like finding green crystal walls in a level made of rock. Particularly devious vaults may not be obvious at first glance... until you open a door and find yourself face-to-face with a room full of big kobolds or worse.
How big are vaults?
A vault can be very small, like the 3x4 "elevator" vault. This vault is nothing more than two staircases, one up and one down, enclosed in a ring of walls. Very small vaults may be referred to as minivaults.
On the other end, a vault can encompass an entire level. The final levels of many dungeon branches, including the big one, are guaranteed to be whole-level vaults. Other such vaults may appear as a floor of the main dungeon.
Where do I find vaults?
Vaults can appear anywhere in the dungeon, though most (if not all) of them are restricted to specific parts. Some vaults are tied to specific branches, while others will only appear if you're deep (or shallow) enough in the main dungeon.
What kinds of vaults are there?
The easiest kind of vault to find is an entrance vault. Entrance vaults are generated on D:1 as something interesting for the player to look at or interact with when they first enter the game. A few can be dangerous if handled badly--one has a large number of monsters behind a warning-scrawled door in a clear wall--but they're generally just eye candy.
Altar vaults are also common in the first few levels, giving the player a chance to join a religion before the Ecumenical Temple or for a god who's missing from it.
Deeper in the dungeon, however, you can find vaults with good treasure or dangerous monsters, and often both. One vault is nothing more than a pair of angled corridors with hostile statues at the end and a bit of treasure behind them.
The entrances to new branches are often contained in a vault that reflects their nature. Orcish Mines is often surrounded by many orcs, natural monsters surround The Lair, and The Vaults may have some treasure just outside.
How many vaults are there?
Though it's difficult to read, the full list of vaults can be viewed here as part of the game's source. A quick search of that directory reveals that there are over 1,000 vaults in the game as of 0.10 and more than twice as many in master (the development version). Do note, however, that these counts include the tutorials, the Hive, and presumably other vaults that aren't seen in the game proper.
Be careful! While vaults can contain very good items, they may also spawn with out-of-depth monsters, like a golden dragon on D:14. When approaching a vault, remember that it may have loose monsters, devious traps, or intelligent denizens who will come out to investigate if you make too much noise. If you actually open a door, be prepared to run if you don't like what's on the other side.