You can get Enterobiasis-causing pinworm eggs by direct spread from person to person. It can also be caught by touching bedding, food items or other material contaminated with the pinworm eggs. After the eggs are swallowed and hatch in the small intestine, they mature in the larger part of the intestines(colon).
Attribution: Avallain