Bilbo encounters Smaug the dragon in chapter twelve of The Hobbit. Bilbo is wearing his ring, which makes him invisible, but Smaug can still smell him. Smaug does not recognize the smell, and demands that the intruder explain who he is and where he comes from.
Bilbo must give the dragon some kind of answer, but he knows it can be dangerous to give any direct information or his name. This would give more power to Smaug. Instead, Bilbo uses epithets, riddles, and descriptions of what he does.
When Smaug asks where he comes from, Bilbo does not name a specific place. He answers:
"I come from under the hill, and under hills and over the hills my paths led. And through the air, I am he that walks unseen."
There is a riddle-like quality to this answer. Bilbo identifies himself as such:
"I am the clue-finder, the web-cutter, the stinging fly. I was chosen for the lucky number."
Bilbo furthers his riddles by telling Smaug some actions:
"I am he that buries his friends alive and drowns them and draws them alive again from the water. I came from the end of a bag, but no bag went over me."
Bilbo describes his adventures instead of giving Smaug a clear answer.
"I am the friend of bears and the guest of eagles. I am Ringwinner and Luckwearer; and I am Barrel-rider," went on Bilbo beginning to be pleased with his riddling.
Bilbo's riddling descriptions allow him to give an answer without giving away his real name.