The answer to this can be found in Chapter 1 of the book. Sherlock Holmes and Dr. Watson are at Holmes’s home, inspecting a walking stick that was inadvertently left behind by someone who stopped by while Holmes was still in bed. From the walking stick, the two of them deduce that the visitor was a country doctor who did much of his visiting on foot.
They can tell that the man was a doctor because his stick says that he is “James Mortimer M.R.C.S.” The initials stand for “Member of the Royal College of Surgeons.” That tells the men that the visitor was a doctor. Holmes concludes that the man is a country doctor who visits on foot because the stick is rather beat up and the iron ferrule (the metal part on the bottom of the stick that prevents the wood from wearing down) was badly worn down. As Watson says,
...this stick, though originally a very handsome one has been so knocked about that I can hardly imagine a town practitioner carrying it. The thick-iron ferrule is worn down, so it is evident that he has done a great amount of walking with it.
Those things indicated that the doctor did a lot of walking in the country.
Holmes does not agree with everything Watson says, but he does agree with Watson’s analysis of the stick.