A mastectomy is a surgical procedure performed to remove one or both breasts, partially or completely. It is commonly used as a treatment for breast cancer. The extent of the surgery varies depending on the stage and aggressiveness of the cancer, as well as the individual's medical history and preferences.