Another electrical engineer here. As discussed, the minerals calcium and magnesium add +2 ions to the water. The ions are removed by attaching to a resin bed loaded with sodium. Basic stuff.
...