A molecule is a chemically aggregate of at least two atoms linked to each other by covalent bonds. Almost all conventional matter on Earth is made up of molecules. Individual atoms are rarely found. A molecule is the smallest amount of a compound that can exist and still exhibit the chemical characteristics of that compound. For example, oxygen and hydrogen atoms are bonded together in a water molecule.
On the other hand, a compound is a substance containing two or more elements formed by a chemical reaction that bonds their atoms together.