In Chapter XII of The Hobbit, Bilbo and the dwarves finally have found a passage inside the Lonely Mountain where Smaug the Dragon lives in his underground lair. Thorin, who is seeking revenge for Smaug's murder of his ancestors and theft of all their gold and jewels, declares Bilbo should be the one to confront Smaug. Bilbo ventures in, gapes at the sleeping dragon and his magnificient treasures, and grabs one gold vessel.
The dwarves are thrilled to see the goblet, but Smaug soons awakens to find it missing. After some debate, Bilbo offers to revisit the lair because he had Gollum's ring, which makes him invinsible.
Bilbo and Smaug begin chatting in riddles, and Bilbo continually compliments the dragon his appearance. Smaug repeatedly accuses him of being a thief.
Bilbo finally decides to leave after he has seen Smaug's unprotected underbelly--his weakness, but his ego gets the better of him.
"Well, I really must not detain Your Magnificence any longer," he said, "of keep you from needed rest. Ponies take some catching, I believe, after a long start. And so do burglars," he added as a parting shot, as he darted back and fled up the tunnel." (227)
Bilbo's acknowledgement that he was the burglar infuriates Smaug, who nostrils shoot flames and vapor at Bilbo.
The hobbit realizes he blundered at the end of the conversation with Smaug.
"Never laugh at live dragons, Bilbo you fool!" he said to himself, and it became a favourite saying of his later, and passed into a proverb. "You aren't nearly through this adventure yet," he added, and that was pretty true as well. (227)
Bilbo faints as he leaves the passageway and is revived by the dwarves. They fix his burns, but it will take time for his hair to regrow.