Sublimation
From Environmental Technology
Evaporation is not quite the correct term to describe what happens to a comet as it approaches the sun. The correct term is sublimation. The term describes what happens when a frozen material changes to gaseous form. (Evaporation describes what happens when a liquid changes to a vapor).
The most common example of sublimation is that of dry ice, which is the common name of frozen CO2. When dry ice is exposed to the air it begins to sublimate, or change to vapor, before your very eyes. This happens to dry ice because at room temperature the frozen gas would rather be a gas than frozen solid.
When a comet approaches the sun, the comet comes to a region of space where it is warm enough that the frozen gases inside the nucleus would rather be gaseous than frozen solid, and that is when the tail and coma of the comet form.
[edit] reference
http://www.windows.ucar.edu/tour/link=/comets/sublimation.html