First of all, the Transportation Security Adminstration (TSA), which is responsible for airport security in the United States, maintains a website information page which includes a page for travelers with 'hidden disabilities.' This page has a lot of excellent information on how to travel with a pacemaker. The main take away points are to remember that you should alert the TSA officials to the fact that you have a pacemaker or defibrillator when going through security. When you have the device implanted, you will receive an identification card which you can show to the security officer as proof of this fact. You are also guaranteed a private alternative screening procedure if you desire one and if you ask.
Regarding the function of the device, walking through a standard metal detector will likely set off the metal detector. However, this will not harm the device. If you set off the detector you can show your defibrillator or pacemaker card to the security officer and you may need an alternative screening procedure. Wands should not be used over the device, as they may have magnets that temporarily disable the device. You should request to be hand-searched rather than using a wand if that is necessary.