A lock is a device that is used, as on a door, to secure or fasten it and is operated by a key or numerical combination.