a device that prevents something such as a door from being opened and can only be opened with a key
If the lock has frozen up, try lubricating it with oil.
She turned the key in the lock to secure the room.
The ancient castle gate had a massive lock.
The locksmith replaced the faulty lock.