Eggs. Infection is transmitted through the consumption of pinworm eggs.
Same as in kids. They only way to get pinworms is to swallow some pinworm eggs (accidentally). This occurs when a person puts his fingers or hands in his mouth after getting an egg or two (or more) on his fingers or under his nails.