magma cooling
Igneous rocks cool from magma. The appearance of the rock is created by the composition of the magma. It is also determined by the rate that the magma cools. If the magma cools deep underground, it cools slowly. If the magma cools at or very near the surface, it cools quickly. This results in two different rock types. The rock types can be told apart by the size of their crystals. The size of the crystals creates the texture of the rock.