Groundwater permeates through rocks and dissolves small amounts of the solids in the rocks. These are mainly calcium salts. They are only very slightly soluble in water. They make the water "hard" which means that it won't form a lather easily when soap is added. That's because the calcium reacts with the soap and forms a "scum" on the surface. This is where the ring round the bath comes from.
These dissolved solids also form spots on windows when the water evaporates.
It is the calcium compounds that cause the water to become hard. Sodium and magnesium compounds don't contribute to hardness. However they all contribute to leaving spots on windows. So window cleaners aren't that interested in the hardness measurement of the water. We are concerned with the TOTAL dissolved solids, since all of them contribute to spotting.
Of course, we aren't in the least interested in dissolved gases like oxygen and carbon dioxide as they evaporate with the water.
The total amount of solids dissolved in the water is found by taking a known volume of water and evaporating it and weighing the amount of solids left behind. The amount of solids left behind can be measured in parts per million. 1 part per million is equivalent to 1 milligram of solids per litre of water.
Since the dissolved salts also affect the ability of the water to conduct electricity, you can also use an electrical device to measure the current that flows. The current depends on the amount of solids dissolved, so the meter can be calibrated in parts per million (ppm) of total dissolved solids (tds).
Hope that clarifies the difference.