Daraprim is used to treat infections such as malaria and toxoplasmosis, particularly in patients with weakened immune systems, such as those living with HIV, undergoing chemotherapy or pregnant women.