Depending on the type of worm, people of any age can get worms from eating raw or undercooked meat or seafood, swimming in or drinking contaminated water, and walking barefoot in places where worms are present.
Sharing objects such as clothing or bedding and not washing the hands regularly also pose a risk.