Disarm the security system using your passcode. The red "Armed" light will turn off.
Take out the screws holding the rectangular or square sensor to the door and remove it.
Place the new sensor in the same place on the door and screw it down tightly.
Unscrew and remove the magnet plate on the interior door frame.
Place the new magnet plate in position on the door frame, so it aligns with the sensor on the door. Secure the magnet plate with screws.
Test the system at the control panel using your passcode.