There are many reasons to have surgery. Some operations can relieve or prevent pain. Others can reduce a symptom of a problem or improve some body function. Some surgeries are done to find a problem. Your doctor or a nurse will give you instructions on what to do before the surgery and what you can and cannot do afterward.