Lock

Locks are staples within The Legend of Zelda franchise.

Function
Locks are mostly present in the dungeons of each game, halting Link's progress through a certain room until he either completes the room's puzzle, or locates the appropriate key to unlock the door somewhere in the previous portion of the dungeon.

Bar Lock
A Bar Lock is a kind of lock on a door usually found in all dungeons. These locks cannot be opened unless a certain task is completed. For example, defeating enemies, moving a block/pot onto a switch, etc. They are called bar locks because of the metal bars that drop down in front of the door to prevent Link from opening it. In a Mini-boss room, the bars drop down when Link enters the room and lifts up when the Mini-boss is defeated.

Boss Lock
Boss Locks are special locks to the bosses in The Legend of Zelda series that requires Link to find a Boss Key, also known as a Big Key.

Originally, as first introduced in A Link to the Past, the Boss Lock opened up to yield a couple final puzzle rooms before the actual boss room. As the series progressed though, the distance between the Boss Lock and the actual Boss Room shortened, and eventually, the Boss Lock became the very final obstacle Link faced before attempting the dungeon boss. Link's Awakening marks the first appearance of true Boss Locks, of which are opened with a Nightmare Key. Every level has a Nightmare Key and a Boss Lock right before the Boss Room. Ocarina of Time, Majora's Mask, and The Wind Waker boasts Boss Locks in the temples (all dungeons in The Wind Waker), and have the final  puzzle rooms, made familiar by Link's Awakening, placed before the Boss Lock, and by extension, the Boss Room, as well. However, the final battle of Majora's Mask, in the Moon, does not incporporate the Boss Lock, unlike Ganon's Tower of Ocarina of Time, as Link must talk to  the child wearing Majora's Mask to proceed directly to the final battle. With the introduction of Twilight Princess, the Boss Lock lost its static appearance in favor of setting and atmosphere. All the boss locks take after the theme of their dungeon, for example, the bedroom lock found in Snowpeak Ruins resembles a heart instead of the common eye-like shape of the boss locks of previous titles.

Key Block
Key Blocks are locked blocks that appear in Link's Awakening, Oracle of Seasons, Oracle of Ages, Four Swords, Four Swords Adventures, The Minish Cap, and Phantom Hourglass. These blocks will stop Link's progress through Dungeons and paths, and they can only be opened by using a small key (or the Ghost Key in Phantom Hourglass).

Locked Door
Locked doors, which are mostly found in dungeons, require a Key to open. The keys from a particular dungeon can be used only on doors within that same dungeon with the exception of the original Legend of Zelda in which keys could be used in any dungeons.