Magnetic contact switch detects the door / windows status. Its trigging multirelay and so turns on or off A/C.
Below types of door/window sensors:
1) Recessed magnetic contact switch
2) Surface mount contact switch
3) Surface mount wireless contact switch