Water is a good solvent, which means it dissolves other substances easily. However, it also picks up impurities easily. So as water moves through rock and soil, it dissolves small amounts of minerals and holds onto them, making it hard water. The degree of hardness becomes greater as the amount of mineral content increases.
On the other hand, soft water is treated water that only contains the positively charged ion of sodium. Rainwater has no minerals, so it is naturally very soft. Often, hard water has a characteristic taste from the minerals and soft water may taste salty.