Dungeon

The Dungeon is one of the highest level biomes in the game. It is either on the right or the left side of the map and can be in a variety of colors. The game randomly picks the color of the bricks and walls when the world is first created.

There is an old man guarding the entrance. If you talk to him during the night he will turn into Skeletron. You should not enter the dungeon until Skeletron has been defeated. If you try to enter without having defeated him, multiple Dungeon Guardians will appear once you reach a certain underground level inside the dungeon. These skulls will act like Skeletron and do its spinning attack. If one hits you, it will instantly kill you.

Inside the dungeon are chests, which can contain Dungeon-only loot (shown below), or the standard loot from underground chests. In order to open these a Golden Key is required. Books, Water Candles, Chain Lanterns and Spikes can also be found here. They can be looted with a hammer and used as decorations for your home.

Enemy spawn rates increase the deeper the player travels in the Dungeon.

Strategies
If the player is not quite capable of defeating Skeletron, there is still a technique for getting to dungeon loot. Digging underground, outside of the dungeon walls, will keep the player completely safe from Skeletron while allowing the player to see the dungeon interior. Once you have found a chest or another object of interest, the player can dig through the dungeon walls to reach it. As long as you also destroy the dungeon backwalls that are immediately behind you, you will not be considered "in the dungeon." Once you have stood in front of the dungeon backwall long enough, the background music will shift to the dungeon background music. Staying in this state for too long will draw the attention of the Dungeon Guardian and in most cases you will be killed immediately.

Biome mechanics
A player is considered to be in the Dungeon if they're below the depth of -4 feet and there are 250 or more Dungeon Bricks nearby.