Why do dogs sniff the ground so much?

India
June 6, 2008 12:49am CST
I have been taking my dog for a walk twice or thrice a day from about a week. Prior to that, she would take herself for a walk in the woods. The changes in my dog's life are because of her bad habit of jumping over fences and eating the neighbor's leftover food, which the neighbor's just throw in their backyard (yucky habit, but none of my business). So, my pooch's movements are very much restricted now, and I make it up to her by taking her for long walks. Well, I have observed that she sniffs the ground a lot. Why do dogs do that? Is it only when they want to pee or poo? Or is there another reason for it? I don't really know much about dogs. So, I will be happy with some informative replies. :)