A magnetic lock is a simple locking device that consists of an electromagnet and armature plate. By attaching the electromagnet to the door or gate frame and the armature plate to the door or gate, a current passing through the electromagnet attracts the armature plate holding the door shut.

The magnetic lock relies upon some of the basic concepts of electromagnetism. Essentially it consists of an electromagnet attracting a conductor with a force sufficiently large enough to prevent the door from being opened.

The magnetic lock should always be installed on the inside (secure side) of the door or gate. Installation is as simple as installing on the header of the door or gate frame for out swinging doors or gates, or using a Z-bracket for in-swinging doors or gates.
It is important to make sure the armature plate and the electromagnet align as closely as possible to ensure efficient operation. Magnetic locks are almost always part of a complete electronic security system. Such a system may simply consist of an attached keycard reader or may be more complex involving connection to a central computer that monitors the building's security. Whatever the choice of locking system, fire safety is an important consideration.