Thorin Oakenshield was the leader of the company that set out to reclaim the Lonely Mountain from Smaug the Dragon. Bilbo Baggins was hired as the company's burglar, and it was on this adventure that the Hobbit found the One Ring. The quest was successful, but Thorin did not survive to reign as King under the Mountain, for he was mortally wounded at the Battle of the Five Armies.
Thorin was born in TA 2746, son of Thrain. Thorin and his younger brother Frerin and younger sister Dis lived in the Lonely Mountain, where their grandfather Thror ruled a prosperous realm as the King under the Mountain. Thror was also the King of Durin's Folk - the leader of the Dwarves who were descended from Durin, the eldest of the Seven Fathers of the Dwarves.
As a young Dwarf, Thorin was of an adventurous nature. One day in TA 2770 when Thorin was about 24 years old, he was wandering outside when Smaug descended on the Lonely Mountain. Many of the Dwarves inside were slain, but others managed to escape. Thror and Thrain used a secret door in the mountainside, though they did not tell Thorin how they had gotten out.
Thorin's family and a small band of followers wandered homeless for many years. They performed menial work to survive, including blacksmithing and coal mining. For a time they settled in Dunland.
In TA 2790, Thorin's grandfather Thror went to Moria intending to reclaim the ancient Dwarf realm of Khazad-dum, but he was slain by the Orc-leader Azog. Thorin's father Thrain mustered an army and waged war against the Orcs of the Misty Mountains.
Thorin fought at the Battle of Azanulbizar in TA 2799. It was there that he earned the name Oakenshield when his shield was broken and he used the branch of an oak tree in its place. Thorin was wounded and his brother Frerin was killed, but in the end the Dwarves were victorious. Nevertheless, the Dwarves did not reclaim Khazad-dum because of Dain Ironfoot's warning that Durin's Bane, the Balrog, still lurked within.
Thorin and his father Thrain returned to Dunland and then they travelled to Eriador, where they settled in the Blue Mountains in TA 2802. They prospered to some extent, but they worked mainly in iron and had little gold. 
Thorin Oakenshield is first met at the Silver Deep Mine during the Dwarf intro as he prepares to leave for the Lonely Mountain.