A pacemaker consists of a generator that produces electrical impulses and electrodes or leads that transmit these impulses to the heart. This generator unit, which contains a lithium-based battery, is typically implanted under the right or left chest wall or in the abdominal area.