In the final conflict of The Hobbit, the Battle of Five Armies, Bilbo spends much of the battle as an onlooker, rather than an active participant:
On all this Bilbo looked with misery. He had taken his stand on Ravenhill among the Elves-partly because there was more chance of escape from that point, and partly (with the more Tookish part of his mind) because if he was going to be in a last desperate stand, he preferred on the whole to defend the Elvenking. (Chapter 17)
Even though Bilbo does not participate in the battle, and is actually knocked unconscious by a stone, the Battle of the Five Armies provides significant resolution to some of the major conflicts that have developed in the novel, like the distrust between Thorin and the Elven King, the argument over reparations for the Lake Town, and Bilbo's 'borrowing' of the Arkenstone, and the threat of the goblins. Tolkien uses the battle to resolve many of these issues; for example, Thorin makes amends with Bilbo after the end of the battle when the dwarf is gravely wounded--only then does he have the perspective to see that he has acted foolishly.