A lock is a mechanical or electronic device engineered to restrict access. It provides security by preventing unauthorized entry or use, often requiring a specific key or code for operation. See also Key Padlock Mechanism Access