Nobody deliberately eats worms but accidentally eating them is common, especially in tropical countries where the warmth and humidity create ideal conditions for worm eggs and larvae.
You can get worms by eating food contaminated by flies, through unhygienic food handling, or by walking barefoot on contaminated soil where parasites can burrow through the skin. Some worms, such as tapeworms, may be in raw or undercooked beef, pork or fish.
Even in developed countries pinworms and whipworms are common, particularly among children. These worms do not cause symptoms other than mild.
Safe eating and drinking practices are essential in minimising your risk of contracting worms.
Treatment of worms is simple you will just need to see a doctor to prescribe the right medication for you.