Sediments on the ocean floor are like a history book for the Earth. It is a large scale, long term collection point for dead and decaying organisms, rock, sand, etc. that can tell scientists at least the following three things:
1) What kind of organisms lived at the time of that layer of sediment, which tells us what temperature ranges were, salinity levels, or food systems present
2) Level of volcanic or tectonic activity at that time and place based on the age and structure/makeup of the sediments/rocks
3) Oxygen/carbon content of the ocean/atmosphere at the time the organisms were alive or when the sediment was formed.
Scientists who study Earth's past climate (paleoclimatologists) are able to extract marine sediment cores from the ocean floor.
Take a look at the attached image to see what the coring process looks like. In the image, you can see how a long, hollow metal tube (like a giant straw) is pushed into the ocean floor. Then, it is lifted back up along with the material inside. Paleoclimatologists can study the layers of sediment to gather information.
The link I've included talks about one of the many findings revealed through the coring process.