Door sensors work because they use a sensor and a magnet. The sensor is placed on the door frame and the magnet on the door itself. A circuit attached to the magnet sends a message to the alarm when the current is disturbed when the door is opened.
There are a number of different sensor alarms available for doors and windows. The least expensive option is the magnet sensor, and door sensors may be wireless or wired. A downfall to this type of sensor is that it is usually highly visible.
Another type of door sensor hides within door frames and works the same way. These are less visible and slightly more expensive. Vanishing sensors are virtually undetectable and blend in to match any decor.
Garage doors may also have sensors attached to them, and these sensors work by placing the sensor on the door or the garage floor. The magnet attaches to the door, and this type of sensor works on all garage door types.
No matter the type of sensor, they all work basically the same way. The difference is the type and visibility of each sensor, but all use a system of magnets and simple circuits. When the sensor goes off, homeowners will be notified remotely or by a monitoring service.