T1,T2 are darlington drive, controlling current to buzzer B1 which has a built in oscillator. D5 is to protect against back EMF.
Current through R3 is sinked by TR4 and FET to ground and output is off. When both FET and TR4 are turned off, current through R3 turns on output .TR4,TR5 hold output low until switch S1 is released.
When S1 closes,it discharges capacitor C2 (0.1uF) through diode causing Fet to turn off and when S1 is released, T4 now turns off current through R3 now turns on the output .
When switch opens, C2 is slowly charged through R5,R6 and drain of FET is slowly pulled to ground and in turn dirve to buzzer slowly decreases and hence volume decays until output fully turned off.
In door alarm application, when switch is in closed position, alarm is off. As soon as switch opens, alarm turns on for a small interval and it cant be disabled by closing switch again. 555 timer IC can do this function
FET can be replaced with a Darlington.