metronome, is a device that produces an audible click or other sound at a regular interval that can be set by the user, typically in beats per minute (BPM). Musicians use the device to practise playing to a regular pulse.
In the 20th century, electronic metronomes and software metronomes were invented.

Musicians practise with metronomes to improve their timing, especially the ability to stick to a regular tempo. Metronome practice helps internalize a clear sense of timing and tempo. Composers and conductors often use a metronome as a standard tempo reference—and may play, sing, or conduct to the metronome. The metronome is used by composers to derive beats per minute if they want to indicate that in a composition. Conductors use a metronome to note their preferred tempo in each section.

When interpreting emotion and other qualities in music, performers seldom play exactly on every beat; expressive, flexible rubato may be used at times. Typically, every beat of a musically expressive performance does not align exactly with each click of a metronome. This has led some musicians to criticize use of a metronome, because metronome time is different from musical time.
The video below explains how to use the Metronome app on smartphones.