How does Bilbo rescue the dwarves?
There are actually two distinct episodes where Bilbo saves the dwarves, if you put aside his "saving" of the whole tale at the end when he takes the Arkenstone to stop war. I will talk about Chapter 8 and how Bilbo rescues the Dwarves from the pesky spiders.
When Bilbo finds the Dwarves after waking up (helped by his enchanted ring that makes him invisible) he realises that they have been paralysed and wrapped up in spiderwebs by the Spiders. Bilbo realises that the death of his comrades is imminent and thus has to act. Using his skill at throwing stones, he throws one at the spider just about to kill Bombur, and kills the spider. Although Bilbo is invisible, the spiders have a good idea of where the stone comes from and thus try to capture Bilbo, who easily eludes them and thus conceives his plan:
The idea came to him to lead the furious spiders further and further away from the dwarves, if he could; to make them curious, excited and angry all at once. When about fifty had gone off to the place where he had stood before, he threw some more stones at these, and at others that had stopped behind; then dancing among the trees he began to sing a song to infurtate them and bring them all after him, and also to let the dwarves hear his voice.
Bilbo deliberately taunts the spiders by singing rude songs at them mocking them. His plan works very well and he doubles back to the Dwarves, killing the guard spider and freeing them and they fight their way free until the Spiders give up the chase and leave them alone.
What is important to note thematically is that this episode represents a further development of Bilbo Baggins. He, independently and without the advice of anyone else, shows his true heroic nature by single handedly saving the Dwarves. Also note the importance of the naming of his sword as Sting. This clearly shows he is beginning to see himself as a hero and recognise his true worth, as he is acknowledging that he is worthy of a "named" sword with its own history like Gandalf and Thorin are.