A pacemaker is a small medical device implanted in the chest or abdomen to help manage irregular heartbeats, known as arrhythmias. It uses electrical pulses to prompt the heart to beat at a normal rate. Pacemakers are often used to treat conditions like bradycardia (slow heart rate) and heart block.