Ionic compounds are crystalline solids formed by packed ions of opposite charges.
These compounds are generally formed when metals react with non-metals.
Metals readily lose electrons, so they have a positive charge while non-metals tend to gain electrons creating a negative charge and the combination of positive and negative charge forms the ionic bond.