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, including green, pink, and blue. The game randomly generates the color of the bricks 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. However, if it one hits during the day, it will instantly kill you. 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 other object, the player can dig to it, through the dungeon walls. 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.

NOTE: As of 1.0.5, this technique no longer appears to work.

Inside the dungeon are chests, which can contain Dungeon-only loot, 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.

Biome mechanics
A player is considered to be in the Dungeon if they're below the depth of 0 ft, there's 250 or more Dungeon Bricks nearby.