What are differences between molecule and compound?

A molecule is formed when two or more atoms join together chemically. A compound is a molecule that contains at least two different elements. All compounds are molecules but not all molecules are compounds.