Why it forms moisture on glass?

what is the reason behind the formation of moisture on glass when we fill the glass with cold water