If your doctor recommends that you have a pacemaker, you will need to undergo surgery for it to be implanted.