In The Hobbit, the dragon who guards the treasure beneath the Lonely Mountain is Smaug. He is the novel's principal antagonist and occupies the dwarven kingdom of Erebor after driving its inhabitants into exile.
Smaug's attack took place long before Bilbo Baggins's adventure. Attracted by Erebor's immense wealth, he descended on the mountain, destroyed the nearby town of Dale, and forced the surviving dwarves to flee. He then settled over the hoard and guarded it for roughly 150 years, rarely leaving his underground lair.
Gandalf helps Thorin Oakenshield assemble a company of thirteen dwarves, with Bilbo recruited as their burglar. Bilbo enters Smaug's chamber and notices a bare patch in the dragon's otherwise jewel-armoured underside. A thrush learns of the weakness and tells Bard the Bowman, who kills Smaug with a black arrow during the dragon's attack on Lake-town.
Scatha, Ancalagon, and Glaurung are also dragons from Tolkien's wider legendarium, but they do not guard Erebor's treasure in The Hobbit. Smaug's name is associated with an Old Germanic verb meaning “to squeeze through a hole.”