Granisetron is used to prevent nausea and vomiting caused by cancer chemotherapy and radiation therapy.