Mostly all ionic compounds dissolves in water because molecules present in the water hydrates the ions. Water is a formation of polar molecules hydrogen (partial +ve) and oxygen ( partial -ve) respectively. When a pinch of salt is poured in water, it breaks into na+ (Sodium positive) and Cl- ( chlorine negative) ions respectively and the partially positive hydrogen molecules are attracted to the chlorine anions where as the partially negative oxygen molecules are attracted to the sodium cations Then the formed bond are free to move around the water which makes it to dissolve in water.