We know that a compound is always formed when two or more elements combine with each other. But these elements do not combine in just any ratio.
When we say “ratio”, we mean just a figure that depicts quantitative (here, dealing with numbers) relationship between two or more things. In case of a compound, this ratio is a comparison between quantities of the elements that make up the compound. And this ratio is “fixed” means it will not change, no matter how and where this compound is formed.
Water or H2O is a compound. If you carefully see this formula, H (element Hydrogen) you will notice that two atoms of Hydrogen combine with one atom of oxygen.
This means for the formation of compound water, Hydrogen and Oxygen have to always combine in the ratio 2:1. And this ratio will remain 2:1 whether you take water from sea, lake, pond, ice or any other source. It is fixed.
Please note that if you consider atomic weight of hydrogen and oxygen, instead of number of atoms that I am referring now, the ratio will be 1:8 (approximately 2 grams of hydrogen combines with 16 grams of oxygen, so 2/16= 1/8 or 1:8).