Your parents were almost certainly looking for worms and they almost certainly saw some.
Mostly these are just tiny little things that can usually be seen at night. \
These little worms have even tinier eggs that are so small you can't see them. Little kids who play in the dirt might get the eggs on their fingers--and from there into their mouth and they swallow them. This is very common and is nothing to worry too much about.
The tiny worms that grow are not like earth worms. They're usually tiny parasites that can only live and grow inside animals and humans
In different parts of the world you find round worms, tape worms or thread worms. Exactly what type of worm your brother might have depends on where you live.
The behaviour of the different sorts of worms is much the same. They all live inside the gut. Often at night time they make their way right down to the anus and become really itchy and bother the child and wake them up. It is a fairly common reason for little children to wake up at night.
So if a little kid is tired and irritable the parents might check to see if she or he has worms. If they have they just give them tablets and that's the end of it. Usually everybody in the household has to have the tablets because the worms tend to be easily spread. But they are cured very easily.
It sounds gross but it's no big deal.