This medication is used alone or with other medications to prevent nausea and vomiting caused by cancer drug treatment (chemotherapy) and radiation therapy. It is also used to prevent and treat nausea and vomiting after surgery. It works by blocking one of the body's natural substances (serotonin) that causes vomiting.