A dungeon is a place where prisoners are kept. In the past, it used to double as the keep.
However, in French the term donjon means "keep" (a form of tower), and the term oubliette or cachot (a form of prison) is a more appropriate translation of the English "dungeon". This word is a false friend.
In 1613, Anton Praetorius described the terrible situation of the prisoners in the dungeons in his book Gründlicher Bericht über Zauberei und Zauberer (Thorough Report about Wizardry and Wizards).
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 of being trapped underground, have made dungeons a powerful metaphor in a variety of contexts.