The dwarves and the hobbit wander for days in the darkness of Mirkwood. At one point, Bilbo climbs a tree to gage their progress. Above the trees, he is "nearly blinded by the light." Although the company is, in fact, not far from the edge of the forest, Bilbo does not realize that fact. When he returns to the ground, therefore, he gives the others a despairing report. Tired, out of arrows and food, and despondent, most of the travelers eagerly grasp at a glimmer of hope when they see far-off lights in the forest; one of the dwarves has been dreaming of a feast, and he believes his dreams may be coming true. Although the others remember Gandalf's warnings against straying from the path, they do just that, drawn on by the sound of merry laughter and the smell of roast meats; soon, the dwarves and hobbit are lost and cannot find their way back. Eventually, desire overcomes the dwarves. They are drawn toward a wonderful, sumptuous feast at which Wood-elves are dining. As soon as the dwarves arrive at the feast, however, they, along with the feast and the elves, disappear, leaving Bilbo alone. Bilbo, exhausted by searching for his companions, falls asleep. When he awakens, he finds he is being wrapped in a giant spider's web. Bilbo attacks and kills it with his sword, however, and gives his blade the name "Sting." Emboldened by his accomplishment, Bilbo sets off in search of his friends.
Wearing the Ring, Bilbo comes upon several other spiders who have captured the dwarves. He throws stones at the spiders, singing songs to taunt them. He manages to attack them with Sting and then frees the dwarves, cutting them down from the trees in which the spiders had hung them. He has, of course, taken off the Ring before freeing the dwarves; he thus allows the spiders to see him. The spiders attack, and are about to recapture the entire company when Bilbo-to his regret-tells the dwarves about the Ring; he plans to put it on and distract the spiders again. The plan succeeds: Bilbo vanishes and begins taunting and "stinging" the spiders, who eventually abandon their pursuit of the dwarves.
Later, the dwarves notice that Thorin is still missing. The narrator informs readers that Thorin has been captured by the feasting Wood-elves, "more dangerous and less wise" than the High Elves of Rivendell, but "[s]till elves they were and remain, and that is Good People." Long ago, the Wood-elves and dwarves fought over gold, silver, and rare gems, and the king of the Wood-elves has a "weakness" for treasure. Thorin and his family, however, had nothing to do with the ancient quarrel, and so Thorin is indignant that he has been taken prisoner. He will not tell the king why he and the others were traveling through Mirkwood, and so he remains a captive in the Wood-elves' dungeon.
When Bilbo kills the great spider, he immediately feels more confident than he has before. When he then frees the dwarves from the other spiders, their estimation of him changes as well. Readers cannot help but notice the change in Bilbo, too. A milestone on the heroic journey has been passed. Note also how the theme of greed reappears in this chapter as the narrator explains the Wood-elves' past conflicts with the dwarves, and how that theme is again interwoven with pride (namely, Thorin's wounded pride at being held as a prisoner; the Wood-elves' wounded pride regarding the long-ago conflict with the dwarves). Thorin's imprisonment offers another example of how misplaced pride can lead to the carrying of old grudges, which can lead to new injuries-creating opportunities, of course, for the proverbial "vicious cycle" to continue.
Incidentally, critics often point to a time in Tolkien's very young childhood in South Africa, in which he was frightened of and bitten by a spider, as a possible source for his depictions of giant, monstrous spiders, not only here but especially in The Lord of the Rings. For his own part, Tolkien dismissed such attempts at biographically based literary criticism.
The Hobbit: Novel Summary: Chapter 8