Chemical reactions are exchanges of electrons between atoms to form stable bound combinations with precise ratios of atoms and accompanied with release or absorbtion of energy. If the water vapor resulting from this very energy reaction is cooled, it becomes a liquid at room temperature. Thus the physical properties of the resulting chemical compound, water, is quite different from the physical properties of the hydrogen and oxygen gases from which water is formed. Hetrogeneous substances are mixtures of chemicals that do not undergo chemical reactions. Thus each separate substance retains its individual identify and could easily be separated by physical or chemical means.
Elements are collection of identical atoms which thus have identical chemical properties.
The chemical properties of each element are determined by the arrangement of the outer electrons which, in turn, is determined by the number of protons in the nucleus. Thus the atomic number indirectly, but completely, determines the chemical properties of each element. Compounds are the result of chemical reactions between elements. They are stable and precise combinations of elements. The ratios of the elements that make up each compound must be exact integer ratios.