Gases can be dissolved in water, just as solids can be. Oxygen and Carbon dioxide are normally dissolved in water, and this is how fishes and other water animals get their Oxygen; they excrete CO2 just as land animals do. And the green plants that live under water use the CO2, and they excrete O2, just as green plants on land do. Also, of course, water dissolves gases from the air.
And a certain amount of the water evaporates and becomes a gas component of the air; the amount of water that can be in the air as vapor depends on the temperature and air pressure. Air pressure is nearly the same everywhere on earth, but of course temperature varies. When the air is saturated with water vapor, if the temperature drops, some of the vapor will condense into dew or rain.
Also, cold water can dissolve more gas than warm water can. Therefore there is more O2 in arctic waters than in the tropics.