A prostatectomy is a surgical procedure for the partial or complete removal of the prostate gland. It is commonly performed to treat prostate cancer, particularly when the cancer is localized or has not spread extensively. The procedure can be an effective treatment option, potentially curing the disease or significantly reducing symptoms.