Surgery is usually the main treatment for basal cell carcinoma and squamous cell carcinoma as well as most types of melanoma. Other times, surgery is used together with other treatment types.