A pacemaker (or artificial pacemaker, so as not to be confused with the heart's natural pacemaker) is a medical device that uses electrical impulses, delivered by electrodes contracting the heart muscles, to regulate the beating of the heart.