The temporary hardness in ground water comes from the presence of soluble calcium bicarbonate. When the water is boiled briefly this compound decomposes to form calcium carbonate which is insoluble. All cacium salts are effectively removed from the water. Calcium in water used in photographic solutions can causes problems with high sulfite containing developers like D-76 where it precipitates out as calcium sulfite and in carbinate containing developers like D-72.
Magnesium compounds are soluble and only affect water when soaps are used for washing. Both calcium and magnesium form insoluble soaps which stick to cloth fibers. Magesium salts in water are not a concern in photography.