Artificial pacemakers are electronic devices that act in place of the heart’s natural pacemaker (the sinus or sinoatrial node). They generate electrical impulses that initiate each heartbeat. Pacemakers consist of an impulse generator (that includes the battery) and wires that connect the pacemaker to the heart. An artificial pacemaker is implanted surgically. After a local anesthetic is used to numb the insertion site, the wires (leads) that connect the pacemaker are usually inserted into a vein near the collarbone and threaded toward the heart. Through a small incision, the impulse generator, which is about the size of a silver dollar, is inserted just under the skin near the collarbone and connected to the wires. The incision is stitched closed. Usually, the procedure takes about 30 to 60 minutes. The person may be able to go home shortly afterward or may briefly stay in the hospital. The battery for a pacemaker usually lasts 10 to 15 years. Nevertheless, the battery should be checked regularly. Battery replacement is accomplished by replacing the impulse generator and is a quick procedure. There are different types of pacemakers. Most are capable of sensing the heart's electrical activity. They allow the heart to beat naturally and do not start pacing unless the heart skips a beat or begins to beat at an abnormal rate. Doctors program the pacemaker before it is implanted. The programming determines what events trigger pacing and at what heart rate. Doctors can also reprogram the pacemaker after it is implanted using a device held against the skin. Some pacemakers can adjust their rate depending on the wearer’s activity, increasing the heart rate during exercise and decreasing it during rest.