A second mainspring driving a hammer against the case or a gong, released when a setting disc reaches the hour.
Everything else a watch does is passive. It shows the time to whoever looks. An alarm is the one function that reaches out to the wearer without being asked.
The difficultyAlarm clocks had existed for centuries. The difficulty was doing it on the wrist. There is no room there for a bell, and no sounding board except a slab of metal pressed against a sleeve.
Own mainspringThe mechanism needs a second source of power, because a hammer beating for twenty seconds would flatten the going barrel. A separate mainspring, wound by its own crown or a second crown position, drives a small hammer through a train regulated by a friction brake.
Setting and releaseSetting is done by a disc under the dial carrying a notch. A lever rides the disc as the hour wheel turns. When the notch comes round, the lever drops and releases the hammer train.
The unsolved part was acoustic.
First makerEterna built the first alarm wristwatch in 1914 and it found no market, because the sound went nowhere.
The fixVulcain’s answer in 1947 was a resonant double case back, a membrane with an air gap behind it. So the hammer drives a sounding board rather than a damped lump of metal.