Making a wine glass produce sound by rubbing the tip of a finger on its rim is a very old parlor trick. It happens because, as the finger moves over the rim, it encounters resistance (friction) from the wine glass. As a result of this resistance, the finger deforms the wall of the glass a bit, but as soon as this happens, the resistance yields, the deformation disappears, and the finger moves on. This cycle is repeated hundreds of times per second as the finger travels over the rim of the glass. The back and forth motion generated by these repeated deformations of the glass (vibrations) pushes and pulls the air adjacent to the surface of the glass generating compression waves much in the same way that waves are generated if you repeatedly smack the surface of the water in a pool. The sound that you hear is these waves reaching your ear.
To perform this trick you need the friction between the rim of the glass and your finger to be just right. If there is too much or too little friction between your finger and the glass, the sound will not be produced. This is why the finger is normally made wet by dipping it in a glass of water or other liquid before moving it over the glass.