As far as how you catch these, I have no idea. I don't know that I have the horse kind. That is just the kind with the most information out there. I haven't been around farm animals much. I've been around plenty of feral cats and dogs (we have done our share of rescuing). My dog came from a farm as a puppy and he had worms. I don't know what kind. We just had him dewormed as you usually do. My daughter did work for a stable for a while. I'm sure I cleaned her boots. Maybe that was it. Or maybe eggs got on the floor from her boots and the cat picked it up and got in my bed and . . . Maybe the petting zoo. Who knows!
What really makes me mad is that NO ONE TELLS YOU that you can pick these up from animals. Not your doctor, not the vet, no one. I absolutely had no idea this was an issue. I thought I should just worry about bacteria, not parasites.