Molecules, are anything with two or more atoms. For example, O2 and CO2 are all molecules. They can be made of the same type of atom or different types.
Compounds on the other hand, are specifically made up of 2 or more different types of atoms. For example CO2 or H2O are compounds.
Think of molecules as a category and Compounds as a sub category.
Ionic bonding
Firstly, Ions are charged atoms. When an atom gains an electron, it is said to be negatively charged ion, while an atom which looses an electron is said to be a positively charged ion.
Ionic bonding is the attraction of positive and negative ions. When these ions meet they form an ionic bond, however these bonds are weak and easily broken.