What Holmes does is he looks at something like the walking stick and tries to figure out as much as he can from it.
For example, he figures out that the owner of the stick has a dog because there are tooth marks in the stick. He determines that the dog is not all that big because it has to grip the stick tightly to carry it (deep tooth marks). He figures out what general size of dog it is from how far apart the tooth marks are.
This kind of reasoning can help him figure out who committed a crime because it allows him to get a lot of information from a very small clue.