Law of constant proportion states that a chemical compound always contains exactly the same proportion of elements by mass. For a given unique chemical compound, its elemental composition is same for any sample that exists. We all know the chemical formula of water is H2O. That is two Hydrogens and one Oxygen atom, which adds up to 18 u.
Let us take one mole of water. Therefore one mole of water will weight 18 grams. So weight of hydrogen in 18gms or 1 mole water is 2 grams and that of oxygen is 16 grams. This ratio is fixed. If we take some mass of water, 8/9 of its mass will be oxygen and 1/9 will be hydrogen. This ratio will never change for water. It does not matter if we take sea water or river water or lake water, this ratio is constant. The stoichiometric ratio of individual elements is constant for a given compound regardless of whatever physical change we bring to it.