With physical keys
A warded lock uses a set of obstructions, or wards, to prevent the lock from opening unless the correct key is inserted. The key has notches or slots that correspond to the obstructions in the lock, allowing it to rotate freely inside the lock. Warded locks are typically reserved for low-security applications as a well-designed skeleton key can successfully open a wide variety of warded locks.
The pin tumbler lock uses a set of pins to prevent the lock from opening unless the correct key is inserted. The key has a series of grooves on either side of the key's blade that limit the type of lock the key can slide into. As the key slides into the lock, the horizontal grooves on the blade align with the wards in the keyway allowing or denying entry to the cylinder. A series of pointed teeth and notches on the blade, called bittings, then allow pins to move up and down until they are in line with the shear line of the inner and outer cylinder, allowing the cylinder or cam to rotate freely and the lock to open.
A wafer tumbler lock is similar to the pin tumbler lock and works on a similar principle. However, unlike the pin lock (where each pin consists of two or more pieces) each wafer is a single piece. The wafer tumbler lock is often incorrectly referred to as a disc tumbler lock, which uses an entirely different mechanism. The wafer lock is relatively inexpensive to produce and is often used in automobiles and cabinetry.
The disc tumbler lock or Abloy lock is composed of slotted rotating detainer discs. They are considered very secure and almost impossible to pick with standard tools.
The lever tumbler lock uses a set of levers to prevent the bolt from moving in the lock. In its simplest form, lifting the tumbler above a certain height will allow the bolt to slide past. Lever locks are commonly recessed inside wooden doors or on some older forms of padlocks, including fire brigade padlocks.
A magnetic keyed lock is a locking mechanism whereby the key utilizes magnets as part of the locking and unlocking mechanism. A magnetic key would use from one to many small magnets oriented so that the North and South poles would equate to a combination to push or pull the lock's internal tumblers thus releasing the lock.
With electronic keys
An electronic lock works by means of an electric current and is usually connected to an access control system. In addition to the pin and tumbler used in standard locks, electronic locks connects the bolt or cylinder to a motor within the door using a part called an actuator. Types of electronic locks include the following:
A keycard lock operates with a flat card using the same dimensions as a credit card or US and EU driver's license. In order to open the door, one needs to successfully match the signature within the keycard.
The lock in a typical remote keyless system operates with a smart key radio transmitter. The lock typically accepts a particular valid code only once, and the smart key transmits a different rolling code every time the button is pressed. Generally the car door can be opened with either a valid code by radio transmission, or with a (non-electronic) pin tumbler key. The ignition switch may require a transponder car key to both open a pin tumbler lock and also transmit a valid code by radio transmission.
A smart lock is an electromechanics lock that gets instructions to lock and unlock the door from an authorized device using a cryptographic key and wireless protocol. Smart locks have begun to be used more commonly in residential areas, often controlled with smartphones. Smart locks are used in coworking spaces and offices to enable keyless office entry. In addition, electronic locks cannot be picked with conventional tools.