Here's a breakdown:
* Magma: Molten rock found beneath the Earth's surface.
* Lava: Molten rock that erupts onto the Earth's surface.
As magma or lava cools, the minerals within it crystallize, forming igneous rocks. The rate of cooling and the composition of the magma or lava influence the type of igneous rock that forms.