An electromagnet is employed in an electric bell.
When the push button is pressed the electric circuit is completed and the armature is attracted towards the electromagnet.
As a result, the small spring gets detached from the screw due to which the electric circuit is broken and the electromagnet is demagnetized.
Hence, the attraction disappears and the armature is brought back by the spring to its original position.
Contact of the spring with the screw is now remade, which completes the electric circuit.
The action is repeated over and over again continuously.
The armature vibrates and the hammer attached to it strikes the gong and the bell rings and sound is produced.