Answer :
Igneous rocks form when magma (molten rock) cool and crystallize. This happens either at volcanoes on the surface of the Earth or while the melted rock is still inside the crust. Two rocks from identical magma to an igneous rock can become either rhyolite or granite, depending on whether they cool quickly or slowly. When lava comes out of a volcano and solidifies into extrusive igneous rock, also called volcanic, the rock cools very quickly. If the lava cools almost instantly, the rocks that form are glassy with no individual crystals, like obsidian. Intrusive rocks, also called plutonic rocks, cool slowly without ever reaching the surface. They have large crystals that are usually visible without a microscope.
--------------------------
Hope this helps!
Have a great day and God bless! :)