A dungeon is a room or cell in which prisoners are held, especially underground. Dungeons are generally associated with medieval castles, through their association with torture probably belongs more to the Renaissance period. An oubliette or bottle dungeon is a basement room which is accessible only from a hatch or hole in a high ceiling.

The word 'dungeon' comes from the French word 'donjon' (also spelled 'dongeon'), which means 'keep', the main tower of a castle. The first recorded instance of the word in English was near the beginning of the 14th century when it held the same mean as 'donjon'. The use of "donjons" evolved over time, sometimes to include prison cells, which could explain why the meaning of "dungeon" in English evolved over time from being a prison within the tallest, most secure tower of the castle into meaning a cell, and by extension, in popular use, an oubliette or even a torture chamber.

Although many real dungeons are simply a single plain room with a heavy door or with access only from a hatchway or trapdoor in the floor of the room above, the use of dungeons for torture, along with their association to common human fears being trapped underground, have made dungeons a powerful metaphor in a variety of contexts. Dungeons are common elements in modern fantasy literature, related tabletop, and video games. The most famous examples are the various 'Dungeons & Dragons Media.'

More Info: en.wikipedia.org