Here's a breakdown:
* Igneous rocks are formed from the cooling and solidification of magma (molten rock) or lava (magma that has erupted onto the surface).
* The process of heating and cooling can happen deep within the Earth's crust or mantle, where magma forms, or closer to the surface, where lava erupts.
* Intrusive igneous rocks form when magma cools and crystallizes slowly beneath the surface. These rocks have larger crystals because they had more time to grow. Examples include granite and gabbro.
* Extrusive igneous rocks form when lava cools and solidifies quickly on the surface. These rocks have smaller crystals or no visible crystals because they cooled quickly. Examples include basalt and obsidian.
So, the key takeaway is that igneous rocks are the product of the heating and cooling cycle of molten rock within the Earth.