Igneous rocks form when molten rock cools and solidifies. That molten rock, called magma when it’s underground and lava when it reaches the surface, can range in temperature from about 700°C to over 1,250°C. How fast it cools, where it cools, and what it’s made of determine the type of igneous rock that results.
How Rock Melts Into Magma
Under normal conditions, the Earth’s interior is actually too cool to melt rock. The temperature increases with depth, but so does pressure, and higher pressure raises the melting point of most minerals. Magma only forms under special circumstances that either raise the local temperature or lower the melting point of the surrounding rock.
There are two main ways this happens. The first is decompression melting: when hot rock from deep in the Earth rises toward the surface, the pressure drops faster than the temperature, and the rock begins to melt. This is the dominant process at mid-ocean ridges, where tectonic plates pull apart and deep mantle rock wells upward to fill the gap. The second is flux melting: when water or carbon dioxide seeps into hot rock, it lowers the rock’s melting point enough to trigger melting even without a temperature increase. This is what happens at subduction zones, where one tectonic plate dives beneath another and carries water-rich ocean floor down into the mantle.
Cooling at the Surface vs. Underground
Once magma exists, it either erupts onto the Earth’s surface or stays trapped underground. That single difference, surface vs. depth, is the most important factor in determining what kind of igneous rock forms.
When lava erupts and hits air or water, it cools quickly. Minerals don’t have time to grow, so the resulting rock has tiny crystals invisible to the naked eye, a texture geologists call aphanitic. If cooling is extremely rapid, no crystals form at all and the rock becomes volcanic glass, like obsidian. These surface-formed rocks are called extrusive or volcanic igneous rocks. Basalt, the dark rock that makes up the ocean floor and builds volcanic islands like Hawaii, is the most common example.
When magma stays underground, insulated by the surrounding rock, it cools over thousands to millions of years. Minerals have plenty of time to grow into large, visible crystals, producing a coarse-grained texture called phaneritic. These are intrusive or plutonic igneous rocks (named after Pluto, the Greek god of the underworld). Granite is the most familiar example, with its clearly visible speckles of quartz, feldspar, and darker minerals.
Sometimes magma starts cooling slowly underground, growing large crystals, and then erupts suddenly. The remaining liquid cools rapidly at the surface, forming tiny crystals around the big ones. This creates a mixed texture called porphyritic, with large crystals embedded in a fine-grained background.
How Mineral Composition Shapes the Rock
Not all magmas are chemically identical, and the composition of the melt determines which minerals crystallize and what rock you end up with. The key variable is silica content. Igneous rocks fall into four broad categories based on how much silica they contain:
- Felsic (more than 65% silica): Light-colored rocks rich in quartz and feldspar. Granite (intrusive) and rhyolite (extrusive) are the classic examples, averaging about 72% silica.
- Intermediate (55 to 65% silica): Rocks like diorite (intrusive) and andesite (extrusive), often with a “salt and pepper” look from a mix of light and dark minerals. They average around 59% silica.
- Mafic (45 to 55% silica): Dark, dense rocks rich in iron and magnesium. Basalt (extrusive) and gabbro (intrusive) fall here, averaging about 48% silica.
- Ultramafic (less than 45% silica): The densest and darkest, dominated by iron- and magnesium-rich minerals like olivine. Peridotite, which makes up much of the Earth’s upper mantle, averages about 41% silica.
As magma cools, minerals don’t all crystallize at once. High-temperature minerals like olivine solidify first, at temperatures near 1,250°C, while quartz crystallizes last, closer to 700°C. This sequence matters because early-forming minerals can settle out of the magma or be removed, changing the composition of the remaining liquid. A magma that starts out mafic can gradually become more silica-rich through this process, called fractional crystallization. It’s one reason why a single volcanic system can produce rocks of very different compositions over time.
Where Igneous Rocks Form on Earth
Igneous rock formation is concentrated at plate tectonic boundaries, not spread evenly across the planet.
At divergent boundaries, where plates pull apart, decompression melting of rising mantle rock generates enormous volumes of mafic magma. Mid-ocean ridges produce both basalt (erupted as pillow-shaped lava on the seafloor) and gabbro (crystallized in chambers just below). This process is responsible for creating all of the Earth’s oceanic crust, making basalt the single most abundant rock on the planet’s surface.
At convergent boundaries, where one plate slides beneath another, water carried down by the sinking plate triggers flux melting in the overlying mantle. The resulting magmas tend to be more silica-rich than those at ridges, producing intermediate and felsic rocks. The volcanic chains above subduction zones, like the Cascades in the Pacific Northwest or the Andes in South America, erupt andesite and dacite. Beneath those volcanoes, large plutonic bodies of granite, granodiorite, and diorite crystallize slowly underground.
Hotspots, like the one beneath Yellowstone or Hawaii, are plumes of unusually hot mantle material rising from deep in the Earth. These can produce everything from mafic basalt (Hawaii) to felsic rhyolite (Yellowstone), depending on local conditions and how much the magma evolves before erupting.
Common Igneous Rocks and How to Tell Them Apart
Texture and color are the two quickest clues for identifying an igneous rock. Coarse, visible crystals mean slow cooling underground. Fine grains or a glassy appearance mean fast cooling at the surface. Light color generally means high silica. Dark color means high iron and magnesium.
Granite is coarse-grained, light-colored, and made mostly of feldspar and quartz. Its fine-grained volcanic equivalent is rhyolite, which has the same chemistry but forms from rapidly cooled lava. Rhyolite often appears in lava domes or as volcanic ash deposits rather than flowing lava, because its high silica content makes the magma thick and resistant to flow.
Basalt is the opposite: dark, fine-grained, and low in silica. It flows easily when molten and can travel long distances, forming the vast lava plains you see in places like Iceland or the Columbia River Plateau. Its coarse-grained plutonic twin is gabbro, a dark rock with visible crystals of pyroxene, olivine, and feldspar.
Diorite sits in the middle, with roughly equal amounts of light and dark minerals giving it a distinctive speckled appearance. Its volcanic counterpart, andesite, is named after the Andes mountains and is one of the most common rocks produced at subduction zones. Obsidian, the black volcanic glass, forms when any silica-rich lava cools so rapidly that crystals never get a chance to develop at all.

