Pagophagia is the compulsive consumption of ice, or, in some cases, iced drinks. It is generally considered to be a form of pica.
Pagophagia is historically interesting in that it helped clarify the effects of pica on nutrition. It had long been questioned whether pica is a cause or a result of nutritional deficiency, most particularly iron deficiency anemia. While it was known that the form that pica takes is often culturally specific and that it can be the result of stress or psychological problems (e.g. OCD), it was unclear if nutritional deficiencies were also a cause. It was apparent that in some cases, at least, nutritional deficiencies appeared to be made worse by pica; perhaps pica was more often a cause than an effect.
In 1969 it was shown that iron therapy resulted in a rapid remission of pagophagia -- and as it is fairly unlikely that the additional cold water in the stomach was inhibiting iron uptake, it was concluded that the cravings were a reflection of mineral deficiency, and not vice versa.
It is, of course, possible that local water supplies might contain iron, calcium, and magnesium, among other minerals, which might explain the cravings -- although if these minerals are the cause of the cravings, there is no apparent reason that one would crave ice more than water. Therefore, it is generally suspected that in the case of pagophagia the behavior is reinforced, perhaps subconsciously, because the ice helps 'treat' some of the symptoms of stomatitis and glossitis that may accompany anemia, specifically by numbing pain and reducing swelling.
It is unclear if these conclusions can be generalized to other forms of pica. We don't really know why so many people crave clay and dirt or starch, or why these cravings often appear during pregnancy. We also don't know why in some cases the cravings target apparently random substances, such as mothballs, coffee grounds, or toilet air fresheners. However, the two most common theories are that the cravings are intended to somehow soothe an upset digestive tract, or that they are an attempt to find nutrients missing from the diet.