The reason sodium chloride can dissolve easily in water is because of water’s hydrogen bonds. In a molecule of water, the oxygen atom attracts the electrons from the hydrogens so strongly that it stays around the oxygen atom most of the time, and only sometimes swings back around to the hydrogen atoms.
This makes the oxygen atom slightly negative, and leaves the hydrogen atoms slightly positive.
The positive hydrogen atoms on the water molecule attract the negative chloride ions in the salt. The negative oxygen atom in the water molecule attracts the positive sodium ion in the salt. This attraction competes with the attraction of the sodium and chlorine for each other, and has the effect of weakening their attraction. If there is enough heat energy to jostle the atoms around, the salt will dissolve in the water.
The attraction of the positive hydrogen nucleus to negative ions or negative parts of other molecules is called a hydrogen bond. Hydrogen bonds make the water molecules attract one another, so water is a liquid at room temperature. Without hydrogen bonds, it would be a gas.
Hydrogen bonds are what makes ice take up more room than liquid water, so ice floats. Hydrogen bonds are also very important in shaping proteins in living things, and water affects how the proteins work.