A pacemaker is a device that sends small electrical impulses to the heart muscle to maintain a suitable heart rate or to stimulate the lower chambers of the heart (ventricles).
The primary purpose of a pacemaker is to maintain an adequate heart rate, either because the heart's natural pacemaker is not fast enough, or because there is a block in the heart's electrical conduction system.