So called worms can be divided roughly into three groups:
Flukes. Most common veterinary fluke pathogen is the Liver Fluke or Fasciola hepatica which affects cattle. Won't concern us here. Trematodes have only one body segment, unlike the cestodes which have several linked segments.
Each segment (proglottid) is sexually complete
Several tapeworms of carnivores (dog and cat) using a variety of herbivorous mammals as intermediate hosts which complete the cycle when eaten
Larvae are the infectious stage!
Hookworms are a potentially life threatening disease in puppies
Trichinosis is an important food borne illness. Pigs ingest the parasite and the worms encyst in the pork. If this meat is eaten by humans, and has not been cooked to the necessary temperature of 77C, humans will become infected with the worm which will migrate through the human body.