A magnetic switch is an electrical switch that makes or breaks contacts in the presence of a magnetic field. That is, the switch remains actuated as long as a strong magnetic
field is present and opens when the field is removed. Examples of magnetic switches include reed switches, Hall effect sensors and electromechanical relays.
Some examples of applications are:
It is used to detect the opening of a door, or as proximity switch for a security alarm.
It is used to measure the magnitude of the magnetic field. Its output voltage is directly proportional to the magnetic field strength through it. It is commonly used in internal combustion engine ignition timing, tachometers and anti-lock braking systems.
The traditional or electromechanical relay uses an electromagnet to close or open contacts.