Hard water contains minerals like calcium and magnesium. Over time these minerals dry on the glass surface, leaving cloudy spots and stains.