Electrostatic interactions occur between ions resulting in the formation of strong ionic bonds. These bonds are formed when metals atoms transfer their valence electrons to non-metal atoms forming positively charged metal ions (cations) and negatively charged non-metal ions (anions). The oppositely charged ions attract each other forming a three dimensional giant rigid structure in the solid state. Ionic compounds have high melting and boiling points as large amount of energy is required to overcome the electrostatic forces of attraction between the charged ions. In the molten state they are good conductors of electricity as the ions become free and mobile.
In cases where a small cation with large charge combines with an anion having a large size the resulting compound may have some covalent characters. Examples are: Magnesium bromide (MgBr2), ferric chloride (FeCl3) etc. There are examples (anhydrous ferric chloride, anhydrous aluminum chloride) of compounds between metals and non-metals which are completely covalent.
Metal atoms are held together by swung metallic bond.