Magma Molten Rock Beneath Earth's Surface
Magma is a mix of molten rock, chemical elements, compounds and solids all of which lay deep beneath the Earth's surface.
When this combination of materials is beneath the surface it's known as magma but once expelled from the vent of a volcano it becomes known as lava.
Intrusive igneous rocks are formed when magma cools very slowly over millions of years below Earth's surface an example being granite. Extrusive igneous rocks form when lava cools and solidifies on the surface of Earth. In many cases the lava cools so quickly that crystals do not have time to grow. One example is obsidian which is natural volcanic glass.