Ionic compounds are compounds composed of ions, charged particles that form when an atom (or group of atoms) gains or loses electrons. (A cation is a positively charged ion; an anion is a negatively charged ion.) Covalent or molecular compounds form when elements share electrons in a covalent bond to form molecules.