Go off is a phrasal verb meaning to become active or to begin to function. If a warning device goes off, it starts to ring loudly or make a loud noise.
• The alarm should go off automatically as soon as smoke is detected.
• Didn’t you hear your alarm clock going off this morning?
But why do we say “the alarm went off” to mean came on? Good question! You must have thought English is a crazy language. 😀
Here’s the real deal:
An alarm system is usually set, so you need something to trigger it. When it is triggered, it has offset, so you say it has gone off. It’s the trigger that has gone off. It’s not the word , as in the opposite of on.