Tapeworms are in the Cestoda class of Platyhelminthes. They are parasitic and latch onto a host organism in order to survive. They can infect just about every animal on the planet. They are hermaphroditic, and reproduce sexually and asexually. Their natural habitat is tall grasslands, where they infect the animals that humans eat.
The Bothriocephalid tapeworm (Bothriocephalid leuciscus) is a parasitic flatworm that can infect almost all animals on the planet, Tapeworms have to live within the intestines of a host because they can't live on their own. Tapeworms usually enter the human body through eating raw or undercooked meats while in the egg or larval stage. Like the Oriental lung fluke, it is hermaphroditic, containing both male and female reproductive organs. It is composed of the scolex, or head, neck, and lower body. These three organs allow the tapeworm to feed off of whatever their host consumed. As shown in the diagram below, once the tapeworm attaches to an animal, such as a cow, and a human eats raw or undercooked meat from that cow, the tapeworm grows and develops in the intestines of the human, until the tapeworm is removed by invasive procedures.