the condensation is formed due to the glass being warmer than the water. The condensation forms into water droplets that run down the side of the glass.
The glass is cooled by the liquid it contains to the liquid's temperature. In an environment such as a warm humid day, the water droplets in the air condense as they come into contact with the colder glass. It collects then dribbles down the glass.