The Na⁺ ions attract the negative oxygen atoms of water. The Cl⁻ ions attract the positive hydrogen atoms of water. The ions become surrounded by a solvation shell of water molecules.
The closer the opposite charges can get to each other, the more stable the system. That's why solvation stabilizes the ions.
Solvation Due to Hydrogen Bonding
A glucose molecule has five OH groups. In solution, water molecules are hydrogen bonded to all these groups. A hydration shell of water surrounds the glucose molecules.