This is due to the fact that water molecules are polar (hydrogens are delta positively charged while oxygen is delta negatively charged). This charge means different parts of the water molecule are attracted to different ions in the solute added to them. This polarity, combined with the fact water is able to hydrogen bond, means water will dissolve many ionic and molecular compounds.