A pacemaker is a small electronic device that is implanted in the chest to regulate and control the heart's rhythm.