Here's why:
* Magma: Molten rock found beneath the Earth's surface.
* Intrusive Igneous Rocks: Formed when magma cools and solidifies *inside* the Earth's crust. These rocks often have larger crystals because they cool slowly. Examples include granite and gabbro.
* Extrusive Igneous Rocks: Formed when lava (magma that has erupted onto the Earth's surface) cools and solidifies. These rocks typically have smaller crystals because they cool quickly. Examples include basalt and rhyolite.
So, while magma is the source material, it's the location of the cooling that determines whether the resulting rock is intrusive or extrusive.