Molecules are made when two or more atoms join together chemically (via covalent, ionic, or metallic bonds). Examples of a molecule would be oxygen gas (O2), water (H2), and methane (CH4). A compound is a molecule that contains at least two different elements. Examples of compounds would be glucose (C6H12O6), hydrochloric acid (HCl), and water (H2O). Oxygen gas would not be an example because is only contains one type of atom, oxygen. Therefore, all compounds are molecules but not all molecules are compounds.
Thus, to answer your question:
Molecules can be made of atoms that are different or atoms that are alike.
The following link is to a YouTube video that give an explanation of the difference between compounds and molecules. The video also provides practice in the identification of each.