Ionic Bonding
Ionic bonding is the complete transfer of valence electron(s) between atoms and is a type of chemical bond that generates two oppositely charged ions. It is observed because metals with few electrons in its outer-most orbital. By losing those electrons, these metals can achieve noble-gas configuration and satisfy the octet rule. Similarly, nonmetals that have close to 8 electrons in its valence shell tend to readily accept electrons to achieve its noble gas configuration.
The nature of the bond
The sodium ions and chloride ions are held together by the strong electrostatic attractions between the positive and negative charges. You need one sodium atom to provide the extra electron for one chlorine atom, so they combine together 1:1. The formula is therefore NaCl.
Reference Links:
http://chemwiki.ucdavis.edu/Theoretical_Chemistry/Chemical_Bonding/General_Principles/Ionic_Bonds