Hydroxyurea is a medication primarily used to treat certain types of cancer, such as chronic myelogenous leukemia (CML) and melanoma. It is also used for sickle cell anemia to reduce the frequency of painful crises and the need for blood transfusions.