One important piece of evidence in solving the mystery was Sir Henry's missing boot. Holmes deduced that the reason a boot was purposefully taken was to give Sir Henry's scent to the Hound of the Baskervilles. The new brown boot was surreptitiously returned meaning that the new one wouldn't serve any purpose. Therefore, it was the scent of Sir Henry from the old black boot that was needed, not one or two random lone boots.
(Holmes) "But, surely, you said that it was a new brown boot?"
(Sir Henry) "So it was, sir. And now it's an old black one."
Another piece of evidence was the letter from Laura Lyons asking Sir Charles Baskerville to meet her at night on the desolate moor. She had asked the letter be burned, but Barrymore had read the remaining unburned bits anyway. Laura hadn't gone to meet Sir Charles. Why not? Holmes deduced that she never meant to go, that she was part of a plot by the murderer to get Baskerville alone.
These and other points of evidence tell Holmes, in one of Doyle's more complex plots, that Stapleton was the murderer. The evening Holmes spent in the Baskerville manor revealed Stapleton's motive: he was the secret child of Charles Basekrville's younger brother and intended to remove his relative then claim the Baskerville inheritance for himself. Stapleton used Henry old black boot to train a Mastiff dog to Sir Henry's scent, starved the dog, then released it, first, against the hapless Sir Charles, then again against Sir Henry, who was happily saved by Holmes.
(Holmes) "I was prepared for a hound, but not for such a creature as this."
(Sir Henry) "You have saved my life."