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 elementss share electrons in a covalent bond to form molecules. Molecular compounds are electrically neutral
Metal + Nonmetal ionic compound (usually)
Metal + Polyatomic ion ionic compound (usually)
Nonmetal + Nonmetal covalent compound (usually)
Hydrogen + Nonmetal covalent compound (usually)