The dwarfs resettled the lonely mountain (Erebor) and made it their capital, they forged a strong alliance with the men of Dale (who had helped kill Smaug).
Chat with our AI personalities
When addressing the elves and men that came to the gate, Thorin refers to himself more than once as " I am Thorin son of Thrain son of Thror King under the mountain"
Thorin wanted to claim the long-forgotten treasure of the Lonely Mountain, because it had once belonged to the Dwarves, and was taken from them by the dragon Smaug. He was also the rightful king of the Lonely Mountain.
The Elven-king, Thranduil, who ruled the Woodland Elves (Northern part of Mirkwood Forest) put Thorin and Company in prinson. Elves and Dwarves have distrusted each other ever since the First Age (The Hobbit is set toward the end of the Third Age), so Thranduil was not kindly disposed toward Thorin's Company. Thorin further angered Thranduil by refusing to tell him either his name or his business, because Thorin didn't trust Thranduil either.
Dain is Thorin's cousin, a Dwarf from the Iron Hills. Thorin sends a raven to summon Dain and his army to help defend the treasure under the Lonely Mountain from the men and elves after Smaug is slain. Dain and Thorin join forces with the men and elves to defeat the evil creatures. He is crowned King under the Mountain after Thorin dies in the Battle of Five Armies.
Dain Ironfoot King Under the Mountain inherited the throne from Thorin Oakenshield after he died in the Battle of the Five Armies. He led the Dwarves from the time of the events in the Hobbit until Sauron's Attack on Erebor (which was concurrent with the Siege of Minas Tirith in Gondor).