When you make sound with a wine glass, what is causing the sound, and what is it related to?

You know when you fill a wine glass with water and rub your finger around the top and it makes a pitch? And if you add more water, the pitch gets lower? What is vibrating and causing the sound, and is the change in pitch proportional to anything, such as height of water, volume of water, radius at the water level, surface area of the top of the water, surface area of the glass being covered, etc.?