Medications that contain pyrantel pamoate are considered to be effective for treating pinworms. These medications are in a class of drugs known as anthelmintics. Anthelmintics paralyze worms so that they can be removed naturally in the stool.