Like detectives, scientists gather evidence that can be found in some part of the earth system, usually the lithosphere, and try to deduct what climate was like in the past. These sediments are composed of numerous things, including the remains of small creatures that once lived near the sea surface. When they died their shells sink to the bottom and get deposited on the floor. Every year, new deposits get laid on top of the older ones. Thus, if you dig down into the ocean floor, and look at the types of creatures that lived during different periods in the past, you can estimate what the climate was at different times in the past.
Glaciers are permanent ice features in mountainous areas.
Both ice sheets and glaciers can contain ice that fell as snow many years ago. These important parts of the cryosphere also record paleoclimate variations. Like sea-floor sediments, ice sheets and glaciers get new layers deposited on them every year from snow fall. So, if you dig into them, you can look at the ice that fell as snow during different times in the past. Also, air bubbles trapped in the ice contain air from the time that the snow fell.