A pacemaker is a small device implanted in the chest or abdomen to control abnormal heart rhythms called arrhythmias by using electrical pulses to prompt the heart to beat at a normal rate. Pacemakers are used to treat slow or irregular heartbeats that can cause symptoms like fatigue, shortness of breath, or fainting. The pacemaker consists of a battery, generator, and wires that connect to the heart and monitor its electrical activity, sending pulses to regulate the heartbeat when needed.