The heat travels to the ice because the ice is colder than the temperature of the air in the room. This happens because the temperature is trying to regulate and when something is warmer than another substance or object then the heat will travel from the warmer object to the colder one. When this happens the ice melts because it can't be a solid for a long period of time.