Hard water stains are caused by the minerals (calcium) in the water. When the water evaporates, the minerals remain, leaving a white residue on the glass. The same mineral deposits can also coat non-immersed filtration equipment.
Vinegar can get rid of these stains quickly and easily. Use a light solution of plain food-grade white vinegar to remove buildup from the pool waterline or around its nozzles. But for flushing the piping system, it is better to buy a special product for flushing swimming pool equipment.