The giant spider that attacks Frodo in J.R.R. Tolkien’s The Lord of the Rings is Shelob.
Shelob lives in a tunnel near Cirith Ungol, the pass leading toward Mordor. Frodo and Sam encounter her while trying to reach the land of Sauron. Gollum guides them toward her lair because he hopes to recover the Ring after Shelob kills Frodo.
Shelob stings Frodo and paralyses him, allowing Orcs to capture his body. Sam, believing Frodo dead, takes the Ring temporarily and uses Sting and the Phial of Galadriel to drive the spider away. Frodo is later found to be alive, and Sam rescues him from the tower.
Shelob is not simply an ordinary giant spider. Tolkien describes her as a descendant of Ungoliant, an ancient primordial spider-like being from the First Age. Ungoliant is far older and belongs to the mythology later associated with The Silmarillion. The spiders of Mirkwood are separate creatures descended from Shelob’s broader lineage.