I once heard in a science class that no one has ever been able to explain why we itch, nor can they explain why scratching makes itches go away.
This phenomenon has plagued my dog recently. He writhes around on his back until he cries, trying to scratch some mysterious ailment. Today the vet told us there was no sign of fleas or anything amiss. She suggested his skin might be reacting to an allergy. As a result, my beagle is now on steroids. :) The vet said the itching should disappear almost instantly. I can't begin to imagine how one thing resolves the other, but I trust her medical advice.
The great thing about dogs, though (unlike cats), is that they take their medicine so willingly. You simply hide the pill in a piece of cheese and then say, "Would you like this cheese?" And the dog, through eager body language, says "Yes." Then he eats it and the pill is gone.
Cats taking pills? Well, that's a post for another day.
Meanwhile, it is to be hoped that the mysterious itching problem has been resolved.