From Tardis Wiki, the free Doctor Who reference

A lock was a device used on several things, most often doors, to seal them and prevent them from being opened without the correct key.

The Doctor's TARDIS was stated to have twenty-one different locks on the inside, with only one being the correct lock. Inserting the key inside the wrong lock would lead to the locking mechanism melting. (TV: The Daleks [+]Loading...["The Daleks (TV story)"]) Later, the lock was said to have a metabolism detector, which blocked entry to the Brigadier when the Third Doctor was absent. (TV: Spearhead from Space [+]Loading...["Spearhead from Space (TV story)"]) Other times, simply possessing the TARDIS key was enough for someone to be able to unlock the doors. (TV: Blink [+]Loading...["Blink (TV story)"])

Other locks could be found throughout history. Often times, the Doctor would use their sonic screwdriver to unlock (TV: The Sea Devils [+]Loading...["The Sea Devils (TV story)"] et al.) or lock specific locks. (TV: Doctor Who [+]Loading...["Doctor Who (TV story)"], et al.)

A deadlock seal could be added to a lock to improve security. Sonic devices such as the Doctor's were ineffective against these types of locks. (TV: Bad Wolf [+]Loading...["Bad Wolf (TV story)"], Invasion of the Bane [+]Loading...["Invasion of the Bane (TV story)"], et al.) However, some could be keyed to specific deadlock seals, as Matron Cofelia's sonic pen was to the building of Adipose Industries. (TV: Partners in Crime [+]Loading...["Partners in Crime (TV story)"])

Yvonne Hartman carried a galactic lockpick. (AUDIO: Poker Face [+]Loading...["Poker Face (audio story)"])

During the Fall of Gallifrey, the War, Tenth and Eleventh Doctors were trapped in a cell in the Tower of London in 1562. The Doctors masterminded a plan to disintegrate the door only for Clara Oswald to enter, revealing that the door wasn't locked. (TV: The Day of the Doctor [+]Loading...["The Day of the Doctor (TV story)"])