Heart or cardiac pacemakers are small electronic devices implanted under the skin. They are connected to the heart by special wires. Pacemakers measure whether or not the heart is beating regularly and at the right speed or pace. They use electrical impulses to get the heartbeat back into normal rhythm if there is a problem.