What are pacemakers used for?

Pacemaker. A pacemaker is an electronic device which uses a lead as an antenna to sense the heart's electrical activity. It uses the same lead(s) to deliver a small electrical impulse to the heart to make it contract if the heart isn't going as fast as the device was programmed to maintain. Pacemakers both sense heart activity and pace it to produce activity. They maintain heart rate. Other things too....
A few things... Keeping the heart rate from going to slow - in heart block - preventing passing out, changing how the heart muscle contracts to prevent outlow tract obstruction - like in hocm, and occassionally to prevent people from passing out - like in severe neurocardiogenic syncope.