Here's a breakdown:
* Magma: When rock melts deep underground, it becomes magma.
* Lava: When magma reaches the Earth's surface, it's called lava.
* Cooling and Solidification: As magma or lava cools, it solidifies and crystallizes, forming igneous rocks.
There are two main types of igneous rocks:
* Intrusive igneous rocks: These form when magma cools and solidifies beneath the Earth's surface. They tend to have larger crystals because they cool slowly. Examples include granite and gabbro.
* Extrusive igneous rocks: These form when lava cools and solidifies on the Earth's surface. They tend to have smaller crystals because they cool quickly. Examples include basalt and rhyolite.