* Intrusive Igneous Rocks: These form when magma (molten rock) cools and solidifies beneath the Earth's surface. Examples include granite and gabbro.
* Extrusive Igneous Rocks: These form when lava (magma that erupts onto the surface) cools and solidifies. Examples include basalt and obsidian.
So, depending on whether the magma cools underground or above ground, you can have igneous rocks forming in both environments.