A wave of contraction spreads across the heart - to the left atrium and then to the ventricles. This enables the ventricles to contract together.
Sometimes, the rhythm of the heart's natural pacemaker process becomes disrupted - a person's heart beats abnormally. It can be abnormally slow or fast, or irregular.
An artificial pacemaker is a small, battery-operated electronic device implanted in a person's chest that sends out regular, adjustable electrical impulses to produce normal contractions of the heart.
There are several types of artificial pacemaker, which have electrical leads connected to different chambers of the heart.
Wires are guided along a vein to the chamber of the heart that needs to be stimulated. The lead extends to the pacemaker, which is fitted between the skin of the upper chest and the chest muscle.
The fitting of artificial pacemakers is one of the most common types of heart surgery performed in the UK.