It was invented by Alfred Vail after 1850 to replace the previous receiving device, the cumbersome Morse register[1] and was the first practical application of the electromagnet.
The telegraph sounder was used at the receiving end of the line to make the Morse code message audible.
It consisted of an electromagnet attached to the telegraph line, with an iron armature near the magnet's pole balanced on a pivot, held up by a counterweight.
When the current ended, the counterweight pulled the armature back up to its resting position, resulting in a "clack" sound.
This was necessary for the operator clearly to distinguish the long and short keypresses – the "dashes" and "dots" – that make up the characters in morse code.