These magnetic contacts are wired reed switches made for home burglar alarm systems. Each set has a magnet and a sensor body. When the door or window closes, the two pieces line up and the circuit stays closed. Open the door and the circuit breaks, which tells your alarm panel something has moved.
The sensors have screw terminals inside, so you wire them to your panel with a basic screwdriver and no soldering. They stick to surfaces using the double-sided tape on the back, which makes them a good pick for renters or anyone who would rather not drill holes. They suit wooden, glass and plastic frames, so you can cover most entry points in an average house.