Magnetic switch is an electrical switch that switches when a magnetic field affects it. They are useful in situations where moving elements cannot make direct contact with the switch. I.e. explosive environments. they also works in water . they are not so good so we prefer to use 2 way switches .