A mastectomy is a surgery in which all or part of the breast is removed. Sometimes nearby tissues such as lymph nodes or muscles are also removed. This surgery is mainly done to treat breast cancer, but it can also be performed to prevent cancer in women who have a very high risk.