She occupied Torech Ungol beneath Cirith Ungol ("Pass of the Spider"), and may also have lived in Beleriand. Her descendants include the Giant Spiders who captured Bilbo’s Dwarf allies in Mirkwood during The Quest for Erebor.
Her spider-silk was spun in two forms: rope and cobweb, and it was strong and well-made, ensnaring anyone who walked into it. Gollum, who had previously encountered the spider, seemed to worship her thereafter, and the Orcs of Cirith Ungol knew of their relationship, referring to Gollum as “Her Sneak.” Shelob they referred to as “Shelob the Great” and “Her Ladyship.”
Frodo and Sam, on their way to Mount Doom, traveled through Shelob’s Lair. Gollum led them that way in the hopes that Shelob would devour them, thus allowing him to retrieve the One Ring. She attacked and stung Frodo, inducing paralysis*, while Sam wrestled with Gollum before fighting Shelob herself. Sam hewed off one claw from her leg and put out an eye; ultimately, Shelob impaled herself on Sting while trying to crush Sam. Her final fate, however, would remain unknown to those in Middle-earth.
* Sam overhears several of the Cirith Ungol Orcs reveal that Shelob could inject a non-lethal dose of venom into her victims to simply render them unconscious, as she preferred fresh meat.
In a letter to his son, Tolkien admitted that Shelob is simply “she” + “lob”; lob being an archaic English word for ‘spider.’