Igneous rock results from the cooling and combining of molten minerals.
The molten material is called magma when it lies beneath Earth’s surface and lava when it reaches the surface.
The type of igneous rocks formed depends not only on which minerals are present, but how quickly the lava cools and solidifies. Lava that cools quickly, usually when it suddenly comes into contact with air or water hundreds of degrees lower than the lava’s temperature, creates glass.
Obsidian, or volcanic glass, is formed this way.
If the lava cools slowly, over years, the minerals combine differently, creating solid masses of rock.