Water, carbon dioxide and glucose are all examples of chemical compounds. Their formulas are H2O, CO2 and C6H12O6 respectively. The formula denotes the number of each type of atom in a molecule. A compound is a pure substance which means that each molecule is identical and the elements always appear in the same ratio.
In a mixture the particles are not identical. For example a mixture of ethanol (CH3OH), a compound, and water contains two different types of molecules and they can be in various proportions to each other.
One way to recognize a chemical compound is by the fact that it has a chemical formula. You can also recognize compounds by their chemical names. For example “carbon dioxide” tells you that the formula contains one carbon and two oxygen atoms.