NaCl forms by forming an ionic bonds Na donates and eleectron and Cl accepts one electron. They both end up with filled outer orbitals. The two ions have an attractive force , Na+ and Cl- form large crystals.
Water is formed by covalent bonds, which means they share a pair of electrons for a bond, and the molecule remains neutral.
The type of bonding has a great effect on the properties of the substances.