Treatment usually involves the administration of anthelmintic medications such as mebendazole, albendazole, or pyrantel pamoate. These medications are typically given as a single dose and repeated after two weeks to ensure the elimination of any newly hatched worms. It's recommended to treat all household members simultaneously to prevent reinfection.