What is the secret of the sounds on a glass?

Well, it’s supposed that when you touch by the sides, the borders of a glass with water inside, it sounds.. What’s the chemical reacftion of this??
What is what really happens??..