The metronome is basically a pendulum similar to what is on a clock. The difference is that the speed of a metronome can be adjusted.
In 1696 Etieune Loulie became the first to use the pendulum principle to create a metronome. His invention and dozens of others that followed were not successful, because a very long pendulum was needed to beat at the slow speeds of some songs.
By the early 19th century, metronomes with adjustable weights on the pendulum were being produced. They were very popular and remain so today.
As technology improved, other types of metronomes were developed, including electric metronomes that made a clicking noise and metronomes with a flashing light to keep the beat.
With today's technology metronomes have become smaller and are incorporated into multifunction units such as electronic instrument tuners.