An atom is most stable when its valence shell—the outermost energy shell that contains electrons—is full. Most elements do not naturally have full valence shells, however, so some atoms become more stable by sharing electrons with other atoms to form covalent bonds. Whenever two or more atoms are bonded together in this manner, they are referred to as a molecule. When molecules are made up of two or more different elements, they are termed compounds.
Covalent bonds link atoms together to form molecules
All atoms want to be stable, and one way that they can achieve stability is by sharing electrons with other atoms. Usually, this provides a full complement of electrons in the valence shell. The sharing of a pair of electrons between two atoms is called a covalent bond. Whenever two or more atoms are covalently bonded together, they are called a molecule.
Compounds are fixed combinations of elements
A compound is any substance made up of two or more elements combining in a fixed ratio. Many molecules are compounds, but not all compounds are molecules—compounds can also be made up of atoms participating in ionic interactions. Water—chemical formula H2O—is an example of a molecular compound. No matter where it is found, it will always contain two hydrogen atoms for each oxygen atom, and the three atoms that make up a single molecule of water will be bonded together by their shared electrons.