Extrusive igneous rocks erupt onto the surface, where they cool quickly to form small crystals. Some cool so quickly that they form an amorphous glass. These rocks include: andesite, basalt, dacite, obsidian, pumice, rhyolite, scoria, and tuff.
Intrusive igneous rocks crystallize below Earth's surface, and the slow cooling that occurs there allows large crystals to form. Examples of intrusive igneous rocks are: diabase, diorite, gabbro, granite, pegmatite, and peridotite.
Igneous rocks formed when lava (molten rock) cools and crystallizes, either at volcanoes on the Earth's surface or when the melted rock is still inside the Earth's crust. Two rocks formed from the same magma, for example, can become either rhyolite or granite depending on how fast or slowly they cool.
The rocks that make the maximum volume of the earth's crust are called igneous rocks.