Most ionic compounds are made up of a metal and a nonmetal. The metal atoms lose electrons to the nonmetal atoms, creating positively charged ions (cations) and negatively charged ions (anions). The electrostatic attraction between the positive and negative ions holds the ionic compound together.