How does heat affect the three states of matter ?

take water for example... when its cold.. water freezes (solid).. then warmer it melts(liquid).. then at 100 degrees c it boils (steam/gas)