When you heat up a chocolate bar what happens? This is almost exactly what happens with rock that is heated up.
It takes a lot of heat to melt rock and that type of heat is only found in the depths of the earth. The rock is constantly being pulled downwards by the movements in the earths crust becoming hotter and hotter, and then finally melting. The temperature rocks have to reach to melt are between 600 and 1,300 degrees Celsius or 1,100 and 2,400 degrees Fahrenheit. After melting, the rock turns into a substance called magma.
When you put a melted chocolate bar into a freezer what happens? This is basically what happens to magma after it cools and turns into stone. This type of stone is called Igneous Rock. When magma cools quickly it forms one type of igneous rock, but when it cools slowly it creates a different igneous rock. Magma cools slowly when the volcano it is in does not erupt but pours it out slowly. When a volcano explodes and magma is sent everywhere it cools quickly.