In the ocean, most of the oxygen in the sea water, H2O, is O-16, with only a small fraction of it being O-18. While the fraction that is O-18 varies with salinity, temperature and evaporation effects, the natural abundance of O-18 in sea water is typically only 0.2%, meaning that for every 1,000 oxygen atoms in the water, about two of them are O-18.
Because the water molecule, H2O, made from O-16 is obviously lighter than that made from O-18, water with O-16 preferentially evaporates over the heavier water with O-18. In warm periods, much of this water falls as rain on the land and then flows back into the sea, maintaining the O-18 to O-16 ratio in the ocean. However, in glacial periods when far more of the land surface of Earth is covered with permanent ice and snow, more of the water evaporated from the oceans falls as snow and stays on the land, thereby measurably increasing the O-18 to O-16 ratio, often referred to as , in seawater.
Hard shelled sea animals build their shells with the materials from the environment in which they live of course, including the surrounding seawater. Therefore, during glacial periods, when in the water is higher than during warm times, their shells will reflect this higher ratio. During warm times, the O-18 to O-16 ratio in their shells would naturally be lower, indicating the different environment in which they live. This ratio is preserved in fossilized seashells.