There are a few ways to measure ancient temperatures (or paleotemperatures) from ice cores. The most widely used method is to measure the oxygen (abbreviated O) isotope ratios within the ice cores. The two isotopes of oxygen used are oxygen-18 and oxygen-16. This measurement is generally performed on the ice (H2O) from the ice cores, but could also utilize the CO2 extracted from the ice cores. The 18O/16O ratio from the ice is measured and then converted to a delta 18O value. The delta (or "difference") 18O value is an expression of the 18O/16O ratio relative to some international oxygen isotope reference material. The math is not too complicated and if you are interested it is partially explained at this US Geological Survey website.
It basically has to do with vibrational energies and their effects on bond breaking and formation. My rule of thumb is that there is more of the heavy isotope in the denser phase of a reaction as temperature increases. So as glacial ice comes from snow, which is precipitated from water vapour...
H2O (v) <==> H2O (s)
In this case the solid is the more dense phase, so at lower temperatures it will have less of the heavier isotope (18) and relatively more of the lighter (16) to reflect a sluggishness of the heavier isotope to react at lower temperatures. This by the way is pretty much independent of the amount of global precipitation.
In general the delta 18O value indicates whether the paleotemperature is higher or lower relative to current temperatures. For example more negative (or smaller) delta 18O values indicate colder conditions and more positive (or larger) delta 18O values.