There are 3 ways to treat cancer: radiation, surgery, and chemotherapy. Medical Oncologists are the docs who design chemo regimens, administer chemo to cancer patients, and manage its side effects. They often also are involved in palliative care (e.g., pain control) for cancer pts who are dying from their disease. Oncologists treat both solid tumors like colon cancer and hematologic malignancies like leukemia and lymphoma.
Hematologist -- treats diseases involving the blood and lymphatic system which don't necessarily have to be cancer (e.g., sickle cell disease, ITP). I'm not sure why this specialty is traditionally grouped in with Oncology but it may have to do with the overlap with leukemia-lymphoma. Most of the manifestations of heme malignancies are in the blood and many of the early pioneers in the field were hematologists working with leukemia-lymphoma patients, although they didn't always know it at the time...
Heme-Onc is considered a subspecialty of internal medicine, which means that to enter the field, you do a few years of fellowship (usually 3-5) after you have done three years of internal medicine. There are some programs out there which are Med Onc only but the vast majority are Heme/Onc. In practice most Heme-onc doctors see both cancer patients and strictly heme patients, but in the academic setting you can find people who do exclusively hematology and exclusively oncology. Sub-sub-specializing (eg, you treat mostly lung cancer patients) also happens in academia and not really any place else.