What causes dirty water coming from cold water side in tub?

If the water is coming from the main, it should not be dirty. If it comes from the cold water storage tank in the loft, maybe it needs to be cleaned or covered.