Mic picks up sound (any sound).
Transistors amplify it.
CD4017 is used as a crude bistable.
TR3 (in theory) converts logic output to enough current for operating the relay.
Its a terrible circuit that gets copied from one web site to another. If you build it you risk damaging the LED and CD4017. It has nothing to distinguish one sound from another and may not operate reliably with a single sound.