At the molecular level, the heat comes from the agitation of the molecules and therefore their atoms. This increase in agitation causes the molecules to be less condensed between them and will separate after breaks in the intermlecular bonds. This distends the material, as we see when we heat a metal, or a transformation of the phase of the material, such as melting ice or boiling water.
The texture of an igneous rock is dependent on the rate of cooling of the melt: slow cooling allows large crystals to form, fast cooling yields small crystals.In addition to texture, igneous rocks may are classified according to their chemical composition.