Sodium is in another group with elements having one electron in their outer shells. Such bonds are relatively weak, and tend to disassociate in water, producing solutions that have both Na and Cl ions. Formation of a crystal of sodium chloride. The overall effect is electrical neutrality. Image from W.H. Freeman and Sinauer Associates, used by permission.
Covalent bonds form when atoms share electrons.
Since electrons move very fast they can be shared, effectively filling or emptying the outer shells of the atoms involved in the bond. Such bonds are referred to as electron-sharing bonds. In a covalent bond, the electron clouds surrounding the atomic nuclei overlap. Formation of a covalent bond between two Hydrogen atoims. Image from W.H. Freeman and Sinauer Associates, used by permission.