A molecule is a group of two or more atoms bonded together, while a compound is a group of two or more atoms bonded together where the atoms are from at least two types of elements. All compounds are also molecules, but all molecules are not compounds.