Lockup

The Lockup, also generically called the dungeons, are a recurring location in Hyrule Castle. While presumably intended to act as a prison for criminals, whenever encountered by Link, it is generally being used by villains who have conquered the castle to imprison him or his allies. It is generally depicted as a long hall with cells on either the hall's left side (facing the top of the screen in a fixed-camera game) or on both sides.

The Legend of Zelda: A Link to the Past
In The Legend of Zelda: A Link to the Past, Agahnim imprisons Princess Zelda in the dungeons and has her guarded by a Ball and Chain Trooper. From here, Zelda sends telepathic cries for help from Link and his uncle, starting the game's plot. The dungeons' prison can be accessed after going down several flights of stairs and paths over deep pits guarded by sword soldiers. Once Link reaches the prison hall, he must fight the Ball and Chain Trooper, who upon defeat provides the Big Key to opening Zelda's cell. After this, the two can escape through the castle's secret passage.

The Legend of Zelda: Four Swords Adventures
In The Legend of Zelda: Four Swords Adventures, the jail can be seen in the level Infiltrating Hyrule Castle. The Links are imprisoned in a jail if one of the searchlights spots them, similar to the Forsaken Fortress in The Legend of Zelda: The Wind Waker. depending on how far through the level they are, they are put in a different dungeon. The first of these can be escaped by falling into a hole under one of the pots in the dungeon, leading to a passage where they can pick up Boomerangs capable of recovering the small key from between the bars. There is additionally a cell containing a Magic Hammer, accessible from using the Boomerang on a group of Crystal Switches inside. After escaping, the Links will exit near the moat. The second jail has a similar passage covered by a pot, though it instead leads to an empty and open cell. When it is exited, it leads onto the roof, showing it is not located in the dungeons.

The Legend of Zelda: The Minish Cap
In The Legend of Zelda: The Minish Cap, Vaati uses the castle's dungeons to store the petrified King Daltus while he impersonates him. They are not visited until the castle has become Dark Hyrule Castle, at which point Link can restore Daltus.

The Legend of Zelda: Twilight Princess
In The Legend of Zelda: Twilight Princess, Wolf Link gets put in the castle's dungeon after he is brought into the Twilight-corrupted land by a Shadow Beast. Here, Midna approaches him and directs him into finding a way out and around the castle's towers and rooftops, leading to Zelda. The dungeon is small and similar to its previous appearances, though it is directly connected to Hyrule Castle Town's sewers. Later, Link passes through again after Midna is gravely injured in order to meet with Zelda again.

The Legend of Zelda: Breath of the Wild
In The Legend of Zelda: Breath of the Wild, the Lockup is one of the many ruined parts of Hyrule Castle. It is mostly separate from the main structure of the castle and has a small waterway through the center of the hall. The cells can be opened with levers found in the hall, though some instead must be accessed from small holes in adjacent cells. Inside the cells are items as well as powerful enemies such as Black Moblins and several types of Lizalfos. A large chamber on the end contains a Stalnox, which upon defeat grants Link the game's only Hylian Shield.