People get pinworm infections from one another. You do not get them from pets. School-age children and preschoolers are most likely to get pinworms.