Many ways... Surgery, chemotherapy, radiation therapy, and bone marrow transplant (or any combination of these) are commonly used to treat cancers. Which therapy (ies) depends on the type of cancer and the extent to which it has spread in the body (determined by staging). There are new experimental therapies currently being tested that try to harness a patient's own immune system for treatment (immunotherapy).
See your doctor. There is no over the counter treatment for cancer. You should talk with your doctor about your options that are specific to your diagnosis.