A compound is a substance made from two or more elements that have reacted chemically with each other. The elements in the compound can NOT be separated by physical means.
Let us see this example below:
Water is a compound. It is written as . This means it is a chemical bond of two elements—Hydrogen and Oxygen. It is written as because there are two atoms of Hydrogen, making it a hydrogen molecule, bonding with one atom of Oxygen.
Note that there are so many ways that molecules of elements join together, forming millions of compounds. All compounds are molecules but not all molecules are compounds.
It is also important to note that compounds do not necessarily look like the elements that formed it. Compounds are usually a result of a chemical reaction or bond, which means that they are entirely new materials. For example, Hydrogen and Oxygen elements are both gases, but after bonding chemically, they form water, which is liquid at room temperature.
Another good example is Iron sulfide, a compound formed from bonding two elements— iron and sulfur.
Iron is silvery grey and can be attracted to a magnet. Sulfur is yellow and cannot be attracted to a magnet. In this chemical bond, sulfur and iron are mixed up and heated. The result is a compound, iron sulfide, which is black and not attracted to magnets. The above is a diagram of the compound.