An ionic compound in chemistry is any compound made up of positively and negatively charged ions called cation and anions, respectively. Anions are formed when an atom, usually a nonmetal, gains an electron and cations are formed when atoms, usually metals, lose an electron. Many of the elements are unstable in their natural state and readily become ions. Because of this some elements are found in nature only as ions in ionic compounds. Ionic compounds consist of atoms held together by ionic bonds which result from a transfer of electrons from a cation to an anion. This differs from the covalent bonds of molecular compounds which result from a sharing of the valence, or outer, electrons. In the ionic compound sodium chloride, sodium (Na) loses one electron and transfers it to chlorine (Cl) to form Na+ and Cl- these combine to form an ionic compound with no net charge, sodium chloride NaCl.
Most ionic compounds are hard solids that are not pliable, also ionic compounds have relatively high melting points. These characteristics can be explained by the compounds’ three-dimensional network called a crystal lattice which is made up of successive layers of atoms in a pattern that results in ions being surrounded by ions of opposite charge. The lattice energy is disrupted by a shift in the layers of ions, placing ions of the same charge next to one another causing repulsion which breaks the bonds. Considerable amounts of energy must be applied to an ionic compound to cause the ions to move far enough to escape attraction of neighboring ions.
(image from: www.chemistry.wustl.edu)