An automatic water softener connected to water supply pipes removes magnesium and calcium from water and replaces them with a trace amount of sodium. Sodium does not react with soap or detergents. This will reduce the amount of soap you would need to use, and insures it will not remain in or on the item being washed, whether the item is tile, glassware, clothes, skin or hair.
The minerals that make water hard usually contain calcium and magnesium. Calcium and magnesium in water interfere with the cleaning action of soap and detergent. They do this by combining with soap or detergent and forming a scum that does not dissolve in water. Because these minerals react with soap and detergent, they remove the soap and detergent, thereby reducing the effectiveness of these cleaning agents. You can overcome this by adding more soap or detergent. However, the scum that is formed can adhere to what is being washed, making it appear dingy.