A magnetic contact switch is basically a reed switch encased in a plastic shell so that you can easily apply them in a door, a window or a drawer to detect if the door is open or closed.
The switch that we are going to use has two parts: the switch itself, that usually comes opened, and the magnet.