A small electronic device that keeps track of your heart rate and, if necessary, sends small electrical impulses to the heart muscle to maintain a suitable heart rate or to stimulate the lower chambers of the heart (ventricles). A pacemaker may also be used to treat fainting spells (syncope), congestive heart failure and hypertrophic cardiomyopathy. It is implanted just under the skin of the chest during minor surgery. The pacemaker has two parts: the leads and a pulse generator. The pulse generator houses the battery and a tiny computer, and resides just under the skin of the chest. The leads are wires that are threaded through the veins into the heart and implanted into the heart muscle. They send impulses from the pulse generator to the heart muscle, as well as sense the heart’s electrical activity.