The Cl atom is short of one electron for completely filling the last orbit. When a sodium and a chlorine atom come close, they complement each other s needs to loan-borrow electrons and therefore easily bond together. The electron given up by a Na atom is easily accommodated in the last orbit of a Cl atom. The compound thus formed is called an ionic or electrovalent compound. Generally ionic bonds are formed between metallic atoms having extra electron to spare and non-metallic atoms which are electron deficient.
Ionic compounds are crystalline in nature.
Because of availability of ions, such compounds are good conductors of heat. Due to their crystalline nature, such compounds also have high melting points. They form electrolytes when molten or in solution. The ion that looses an electron is called a positive ion or a cation. The ion that gets an electron is called a negative ion or an anion.