Surgery is a treatment used to repair the body or treat pain caused by an injury. Surgery is not right for everyone. While some are successful, it is best to try other less invasive treatments first.