Individuals contract pinworm infections by accidentally ingesting the microscopic eggs, Mayo Clinic states. Pinworm eggs are often spread from the hands to the mouth, or they may be present in contaminated food and beverages. Scratching infected areas also transfers eggs to the fingernails, making it easy to contaminate other surfaces.
Pinworms are parasites that grow and hatch in the digestive system and travel to the anal opening to lay new eggs, according to WebMD. Pinworm eggs easily stick to other surfaces, so scratching the infected skin increases the chances of transferring the eggs to any toys, food, clothing or furniture a person touches. Outside the human body, the eggs can survive two to three weeks, and they do not affect pets.