A pacemaker is a small device that's placed in the chest or abdomen to help control abnormal heart rhythms. This device uses electrical pulses to prompt the heart to beat at a normal rate. Pacemakers are used to treat arrhythmias, which are problems with the rate or rhythm of the heartbeat. During an arrhythmia, the heart can beat too fast, too slow, or with an irregular rhythm. A pacemaker consists of a battery, a computerized generator, and wires with sensors at their tips. The battery powers the generator, and both are surrounded by a thin metal box. The wires connect the generator to the heart. A pacemaker helps monitor and control your heartbeat. The electrodes detect your heart's electrical activity and send data through the wires to the computer in the generator. If your heart rhythm is abnormal, the computer will direct the generator to send electrical pulses to your heart. The pulses travel through the wires to reach your heart.