Pinworms (Oxyuris equi) are one of the primarily causes of tail rubbing in horses. Through rubbing, horses spread the eggs of the pinworm throughout their environment, which are able to live for a significant period of time since they are quite hardy.
Horses become infested with pinworms from ingesting their eggs from contaminated pasture grass, fence posts, feed, hay, water, stalls, or anywhere close to where infected horse was rubbing their tail. Once ingested, pinworm eggs hatch and larvae mature in the large intestine, while feeding off the intestinal lining until they mature into adults. Once mature adults, pinworms relocate to the anus where they lay their eggs, that they cover with a sticky fluid that causes severe itching.