Valence electrons are found in the outermost energy level and are involved in forming chemical bonds. Ionic bonds are formed between atoms that have formed cations and atoms that have formed anions. An atom that loses one or more electrons has been oxidized and forms a cation. Cations have a positive charge. An atom that gains one or more electrons has been reduced and forms an anion.
Anions have a negative charge.
Positively charged cations are attracted to negatively charged anions and this attraction is what holds the ionic bond together. With ionic compounds, the positive and negative charges must be balanced. Covalent bonds form between nonmetals. Covalent bonds form through the sharing of valence electrons. Hydrogen bonds result from electrostatic attraction between oppositely charged portions of neighboring polar molecules.