In The Hobbit, how does Smaug know that Bilbo is different?
Smaug knows Bilbo is different because he smells him.
Smaug is the dragon that lives under the mountain in the Lonely Mountain. He sleeps on a pile of treasure, actually. The dwarves want this treasure back, and they take off on a mission to get it. They need a burglar, so the wizard Gandalf recruits Bilbo.
There was a most specially greedy, strong and wicked worm called Smaug. One day he flew up into the air and came south. The first we heard of it was a noise like a hurricane coming from the North, and the pinetrees on the Mountain creaking and cracking in the wind. (Ch. 1)
Since Bilbo is the burglar, he is elected to go into the dragon’s lair and get Thorin’s treasured Arkenstone. Bilbo is actually just a hobbit, but by this time he has already been through enough to show that he is definitely brave. Bilbo is witty and intelligent, and this shows in his interaction with the dragon.
Bilbo sneaks in and grabs a cup. He thinks everything will be fine, but the dragon knows any little thing disturbed or missing. Bilbo goes back to get the Arkenstone, thinking that he is small and can walk so quietly that the dragon will not know he is there. Bilbo “had forgotten or had never heard about dragons' sense of smell.”
Indeed, Smaug immediately knows that Bilbo is there.
"Well, thief! I smell you and I feel your air. I hear your breath. Come along! Help yourself again, there is plenty and to spare!" (Ch. 12)
Bilbo speaks very politely to the dragon, but the dragon is not fooled. He does not immediately eat Bilbo or burn him up, because Bilbo is different. He has never smelled a hobbit before.
"You seem familiar with my name, but I don't seem to remember smelling you before. Who are you and where do you come from, may I ask?" (Ch. 12)
Bilbo is able to get away, with the Arkenstone, because he actually is small and very fast. However, the dragon gets angry. He takes off to the lake to attack the people in revenge.