Covalent bonds are formed when two atoms share one or more pairs of electrons. These atoms are non-metals, such as Carbon, Oxygen and Hydrogen.
Ionic bonds are formed when an atom gives one or more electrons away to another atom. These bonds are formed between a metal and a non metal.