It is actually caled a horsehair worm. They only infect insects. They dehydrate their hosts that make the insects go to water for a drink. Generally insects fall into the water at one point. That is when the worm escapes out of the anus killing it's host.
That's a parasitic worm- Spinochorododes tellinii- whose larvae infests grasshoppers, and occasionally crickets. When the larvae is done thriving inside the bug's body, it uses mind control to force the bug to find standing water (such as a mucky pond) and drown itself in it, so the now-adult worm can leave the bug's body and thrive in the water.
HORSEHAIR WORMSby Lee Townsend, Extension Entomologist
University of Kentucky College of Agriculture
Horsehair worms, also known as Gordian worms, belong to the group Nematomorpha. They are similar to nematodes but much longer (4 inches or longer) and very thin (1/80 to 1/10 inch diameter). Horsehair worms normally are found in water or wet areas, such as in or alongside streams or puddles but they can occur in cisterns, livestock watering troughs or most any open container with water. These curious creatures writhe slowly, contorting their hair-like bodies into intricate knots.
Horsehair worms develop as parasites in the bodies of grasshoppers, crickets, cockroaches, and some beetles. When mature, they leave the host to lay eggs. These interesting creatures are not parasites of humans, livestock, or pets and pose no public health threat.
Life Cycle
Adults mate in water and females lay long gelatinous strings of eggs. Depending on water temperature, the eggs hatch in two weeks to three months. The life of the microscopic larvae is not completely understood. Within 24 hours after hatching, it is thought to form a protective covering or cyst. If the cyst is eaten by a suitable insect, the protective covering dissolves and the released larva bores through the gut wall and into the body cavity of the host. There, it digests and absorbs the surrounding tissue. When mature, it leaves the host insect to start the process again.
Control
These long, slender creatures are harmless so there is no need for control. Their presence indicates that a cricket or some other host insects got in the container and died, releasing the worm. Check for cracks or openings that can be screened or sealed. The horsehair worms are not a problem but contamination from other sources can be.
HORSEHAIR WORMS
James V. Robinson, Extension Entomologist
and Mary Wicksten, Associate Professor of Biology
Texas A&M University
Horsehair worms (Fig. 1) are usually found moving about in puddles of water, on damp sidewalks and patios or they may come wiggling out of insects. These creatures have no economic importance to man other than being parasitic to some insects. Horsehai r worms belong to the phyllum Nematomorpha. One of the most common species in the United States is Gordius robustus (Pennak 1953).
The body of horsehair worms is extremely long and thread-like, and lengths of a foot or more are not atypical. The diameter is usually not much more than a pencil lead. The color is usually creamy to blackish. When found, they are usually twisted and coiled much like a piece of discarded thread. The hair-like nature of these worms is so striking that it was formerly thought that they arose spontaneously from the hairs of a horse's tail.
When water troughs were common in cities, hairs from horses would collect in the water. As a coincidence, insects parasitized by horsehair worms would also fall into the water and die. The worms would then emerge from the insect and begin to swim around. It appeared that the real horse hairs had become living worms. Hence, the term horsehair worm.
Not much is known about the life of a hairworm. Adults, the stage most commonly seen, live in water or very moist soil. The immature stages are all parasitic in insects and crustaceans. The adults live in all types of fresh-water habitats in temperate and tropical regions of the world. They commonly swim or crawl about by whip- like motion. The immature stages are parasitic to insects living in or near water or moist soil. Beetles, cockroaches, crickets or grasshoppers are the most common host insects. One species lives in salt water and parasitizes hermit crabs and true crabs. Emergence from the host occurs only when the host is near water. Occasionally, they are found after a cricket or cockroach is killed by someone crushing the insect, at which time the worm begins to wiggle out of the insect's body.
Since the worm is parasitic, it is assumed to be beneficial in helping control certain insects. Its value as a parasite is questioned because the worm does not kill the host until the host reaches maturity. Horsehair worms are not parasitic to man or his pets. Therefore, the creature is of importance only because it is a parasite and is one of nature's oddities. If they bother you, like they would if they were swimming around in your pool or bath, the best control is their removal with a net.
Horsehair worms can be confused with other parasitic worms of the order Nematoda. Parasitic nematodes can be separated from horsehair worms by the structure of the (posterior) end of the body. The "tail" of parasitic nematodes is hooked and the anal op ening occurs before the body's end. In contrast, the end of Gordius horsehair worms have a cleft (Fig. 2).
Pennak, R.W. 1953. Chapter 10: Nemato morpha (Horsehair Worms, Gordian Worms), pp. 232-239 in Fresh-water Invertebrates of the United States. The Ronald Press,
New York. 769 pp.
Legends
In the spring, these worms can be found in tangled masses. This has led to a variety of stories about their origin. The name horsehair worms refers to the old belief that they came from horse hairs that fell into water and came to life. The name cabbagehair worm is used in some localities because they can be found in the water droplets that collect in cabbage leaves. Since they are usually contorted into “knots”, the name Gordian worm was used by some. According to Greek legend, King Gordius of Phrygia tied a complicated knot. The person who could untie it would be the future ruler of Asia. Alexander the Great wasn’t able to untie the knot so he cut it apart with his sword. Although biologists have partially untied the mystery of these knotty worms, certain aspects of their biology are still coiled up tightly.