Like a hamster in a labyrinth
Dungeons contain mazes or maze-like architecture, not a terribly new concept.
There are also two types of mazes, the good and the bad ones. The good ones require creative thinking and problem-solving to catch the hints about how to stay on track. The bad ones won´t give you any hints, just numerous dead ends. Remove any mapping feature, add random encounters or respawning enemies and you get a recipe for significantly extending the length of a game while risking to really annoy the player. An otherwise entertaining game got really carried away with this: the "medieval section" of Secret of Evermore throws you into one maze after another.
|If you need more mazes in your life|
One subspecies of the maze-like dungeon is the randomly generated dungeon. It is most common in action-oriented games where the focus lies less on cleverly constructed puzzles and more on non-stop fighting action. They help to keep the experience fresh, especially if the game demands from you to run it multiple times. But don´t trust the promises about unlimited numbers of completely unique dungeons. It is more like a rearrangement of slightly altered rooms.
|The randomly-generated dungeons were a big thing in Diablo 2|
Prepare for the battle
Dungeons are also a neat place to deposit tough enemies. Or they make it harder for the player to recover from the battle so it becomes a big endurance round. As a general rule, you have to stock up on healing items and such things before you enter. And hope for a forgiving Game Over mechanic if you run out of reserves. It is also a convention that a really tough boss monster sits at the end of the dungeon. Again an example that took it to the extreme: in the early Final Fantasy games, the last dungeons were traditionally HUGE and without any possibility to save your progress. Oh the joy of 2 hours of dungeon crawling and then getting ambushed and killed without a chance...
Puzzles, traps and riddles
Just as the labyrinths do, puzzles and riddles challenge the wits of the player. They can take lots of different forms, from logic puzzles like in newspapers to environmental puzzles (directing light rays by turning mirrors around is a very common one). Traps are a bit different, they are used for punishing players when they fail at puzzles. Or they appear without warning to throw you off-guard. Just think about the infamous mimic chests. Or they slap greedy players that thought they could loot this tempting treasure room without consequences. It goes without saying, the most famous dungeons are found in the Zelda franchise.
|Everyone who played Ocarina of Time will know|