Aw, come on guys... its four NAND gates, three of which (2, 3, and 4) are wired as inverters. If the loop is closed when the alarm is SET (turned on) via switch SW1, then input to NAND 1 is held low and its output will be high. This is inverted by NAND 2 causing its output to be low. The low output of NAND 2 is inverted by NAND 3 whose output goes high. The output of NAND 3 is inverted by NAND 4 whose output goes low, preventing the transistor from conducting. Thus the alarm does not sound.
If the loop is opened, then all of the NAND outputs change states, but with a delay for NAND 3 while C4 charges through R6. After the delay NAND 3 output goes low, NAND 4 output goes high, and the transistor is turned on through base current-limiting resistor R7 to energize the relay and the alarm sounds. The delay allows the loop to be opened on re-entry to the premises without immediately sounding an alarm. However an LED is illuminated via R4 as a reminder to turn SW1 to OFF before the alarm sounds.
If the loop is not closed yet when SW1 is moved from OFF to SET, then uncharged C2 keeps the input on pin 1 low until it charges sufficiently to present a logic high input, enabling the other high input (caused by the open loop) of NAND 1 to sound the alarm. This delay allows time to set the alarm and subsequently close the loop after exiting the premises.
Diode D1 latches the alarm on after the loop is broken and entry time delay has expired, ensuring that even a brief interruption of the loop after it is "armed" will cause the alarm to sound. Diode D2 and D3 discharge capacitors C2 and C4 respectively through R1 when switch SW1 is placed in the OFF position. Diode D5 protects the transistor from back emf of the relay coil. I have no idea what D4 does.
Pretty cool circuit that doesn't use much power until the alarm is tripped. The 9 V "transistor radio" battery should last for at least the shelf life of the battery, several years if alkaline type is used.
Of course simple loop alarms are easily defeated by placing a jumper around the device that opens the loop. That's why a balanced current scheme is used with professional installations. This circuit should be "gud enuf" to protect a home garage or shed. Most thieves know nothing about intrusion detection systems, and even less how to defeat them.