It looks like you're thinking of tapeworms. Something like this? Are the “sections” you ask about flat? If tapeworms, those sections are called proglottids. read more
B. A worm has sense organs in its head end to respond to food, mates, and predators. D. In some worm species, each individual has both male and female sex organs. read more