A person can get these worm-like parasites by swallowing their eggs. This may happen after a person touches contaminated soil. The eggs can be swallowed when they are transferred from the person's hands to the mouth.