Simplest way to look at work is force times distance and is measured in the same units as mechanical energy. In fact, energy is defined as the ability to do work. For this example, rubbing two ice cubes together, the force is friction between you have to overcome by rubbing two ice blocks together and the distance is the how far you move the blocks each time you move them past each other. The more times you rub them the greater the distance will be. If the friction force were measured in Newtons and the distance in meters the units for work would be Newton-meters also known as Joules.
Joule was the scientist that related the mechanical energy to heat energy. Today, we know that 1 calorie of heat is equivalent to 4.184 joules of mechanical energy.
Since 1 g of ice at 0 degress C requires 80 calories to become 1 g of water at 0 degrees C you would need to do
80 calories * 4.184 J/cal = 334.7 J of work
The work involved would be mechanical energy that directly translates to energy which would be translated to the molecules of ice. This mechanical energy would transfer to friction, which is the force that opposes two things contacting each other when they move. There are several ways you could describe what is happening here. The solid molecules of ice are aquiring more energy from the friction, freeing them from their solid state into a liquid state. The phase change from a solid to a liquid is also described as being endothermic, meaning energy has to be put into the system to enable the change to occur. The phase change would not be as a result of heat from the conduction of heat from your hands. You could also describe the phase change in terms of positive energy, as energy was subtracted to get the liquid molecules of water to freeze into their solid state.