Homeowners install security systems to protect their families and belongings. There are a variety of burglar systems for people to choose from including deluxe monitored system that watch break ins, fires and carbon monoxide as well as a basic system that just has a loud siren. People who enjoy doing things themselves can buy a system at a store or on the internet and install it on their own. Large security systems like ADT who provide monitoring systems will install a home security system for free or at a reduced cost. A component of a good home security system are the door sensors. 
Door sensors are protective devices that will send a message when a door is opened or closed. Through the use of magnets the sensors will send a wireless signal to the home security system when the contact between the transmitter and magnetic sensor is tripped. Sometimes you will see an LED light that illuminates when the magnetic contact is broken. Typically, they are small rectangular boxes that you will see mounted on the doors and windows.
Sensors are used on entry points like doors and windows. Each contact has a unique ID code the central monitoring system can determine what entry point has been tripped. Often times you cannot turn your alarm on unless all door and window sensors are closed. Your system will light up what sensors are not connected so you know which one needs to be closed.
These door and window sensors also have another use. It tells you when a door or window is opened. This comes in handy when you have small children in the house. Sometimes my children will open a door. The door sensor sends a signal to the alarm system that makes a small chime. I find it very useful to help me monitor the kids when they are out of sight.