The Alarm is a device used to alert the inhabitants of a building of the presence of intruders. It is a siren that may also include lights and other indicators.
In Video Games
The alarm is something made to be undesirable to the player to trip being that it brings enemy attention to them. It is often present in stealth games as a challenge to the player.
However, sometimes the alarm can just be part of the ambiance of the environment and go off by default.