First you need to know the different between an ionic and covalent bond. An ionic bond is the pairing of a metal and non-metal element. A covalent bond is the pairing of 2 nonmetals.
Metals are the elements at the left of the periodic table while non-metals are the elements at the right of the periodic table.
You should also know the diatomic (di means 2) molecules also known as the fab 7. These molecules will always form covalent bonds. These molecules are hydrogen, nitrogen, oxygen, fluorine, chlorine, bromine, and iodine. With the subscripts, these molecules would be written as H ₂, N ₂, O ₂, F ₂, Cl ₂, Br ₂, and I ₂.