Anthelmintics are a class of drugs used to treat infections caused by helminths (parasitic worms), including flatworms, roundworms, and flukes. These drugs work by either killing the parasites or expelling them from the host body without causing significant harm to the host.