Spider wasps are solitary; that is, each female works alone to provision a nest for her offspring rather than working in a social colony. When the female wasp is ready to lay her egg, she seeks out a spider to help raise her child. She stings the spider to paralyze it and then lays an egg on its abdomen. Soon, the egg hatches and the larva that emerges remains attached to the spider, living on its abdomen and sucking hemolymph (kind of the arthropod version of blood) from its body for nourishment. After a few weeks like this, during which the spider goes about its life as normal, the wasp larva is ready to move on to the next stage of its life cycle. To do this, it needs to make a cocoon. A spider’s web is a decent place to build one, but not perfect. It’s suspended above the ground and the sticky threads provide defense from predators that might eat the wasp, but it’s far too flimsy to support the heavy cocoon and the adult wasp that will come out of it.
The wasp gets around this problem by forcing the spider to build a web that suits its needs. It injects a chemical (which hasn’t been identified yet) into the spider that alters the host’s behavior. The spider begins building its web as normal, but instead of completing all the steps and getting a carefully-patterned web, the zombified spider simply repeats the first few steps over and over again, resulting in a web that’s just a few heavily-reinforced anchor threads and a small center section.
Once the web is done, the spider crawls to the center of the web and sits there complacently. The larva molts, kills the only companion it has ever known, sucks any remaining useful bits out from its corpse, and discards it. Then, it builds its cocoon on a web custom-built for the job. A few weeks later, the adult wasp emerges and flies away, and the cycle starts over.