The adult worms live in the colons (large intestines) of human children and apparently feed on human fecal matter.NEJM -- Enterobius vermicularis -- Data Supplement - Video
When adult male and female worms copulate, each female pinworm produces about 10,000 fertilized eggs. At night, the pregnant female migrates from the colon, out through the child's anus and onto the skin of the buttocks. There she violently expels all of her eggs and dies. Some of the eggs become airborne and land elsewhere in the child's room, but the great majority of the fertilized eggs stay on the skin of the child's buttocks. The eggs mature within six hours of being laid.
The adult worms and the eggs on the skin of the buttocks can cause intense itching in the child. When the sleeping child scratches, the eggs often get on the fingers and under the fingernails. If the child sucks his or her thumb or otherwise brings his or her hand to the mouth (perhaps while eating breakfast), the pinworm eggs are swallowed. They usually hatch within the small intestine and mature there. When they become adults, they move to the colon where they take up residence. The entire life cycle lasts four to six weeks.