Hardness of water is due to the presence of dissolved metal ions, primarily Ca²⁺ and Mg²⁺. Temporary hardness can be removed by boiling, while permanent hardness requires other methods like ion exchange or chemical precipitation.