Shelob was a man-eating creature in spider form, high in the mountains of Mordor, the last of the spawn of Ungoliant. Her lair was along the path that Sam Gamgee and Frodo Baggins took while seeking Mount Doom. Apparently she had some sort of understanding with Gollum, whom the orcs of the Tower of Cirith Ungol called "Her Sneak".
She attacked and bit Frodo, who lapsed into a deathly coma. Sam managed to defeat her by letting her impale herself upon his sword while trying to crush him, and she fled to her lair wounded, although the tale does not tell if her wound was mortal.
Thinking Frodo dead, Sam took the One Ring from him and left his "body" behind, but was horrified when a party of orcs took it, only then revealing in their conversation that Shelob's venom was not intended to kill its victims but only to render them unconscious and keep their meat fresh.
The name "Shelob" was derived from "lob", an archaic English word for spider. A variation, "cob" is the derivation of the word "cobweb".