t's an example of a mermithid worm... which is a nematode, a worm which is a endoparasite which survives in arthropods like spiders. They work by slowly eating the spider up from the inside...consuming fluids, digestive glands, gonads. (How gross, huh?) As this goes on, the spider becomes progressively dehabilitated but stays alive.
Mermithid worms can also be found in scorpions and crustaceans. Eventually, if they were left alone they would burst out of the arthropod's body like in the movie "Alien." The spider in this video died because it was sprayed, which is why the mermithid has emerged early.
Learn more about endoparasites here: http://en.wikipedia.org/wiki/Endoparasite#Types
This video is rapidly going viral since it's not everyday you see a gigantic worm crawling out of a spider.