When sodium chloride dissolves in water it dissociates into Na+ and Cl- ions.
NaCl + H₂O --> Na⁺+ Cl⁻
Both Na+ and Cl- ions are solvated by water molecules.
Water molecule has a dipole due the difference in electronegativity between the H and O atoms, as a result H and O atoms in water molecule acquires a partial positive and negative charge respectively.
δ⁺ δ⁻ δ⁺
H - O -H
Na⁺ and Cl⁻ gets attracted to the partial negative charge on the O atom and partial positive charge on the H atom respectively of water molecule. Thus ion dipole bonds are formed between NaCl and water.