Deep inside Earth, between the molten iron core and the thin crust at the surface, there is the mantle, a large layer of rock that is largely solid, but flows like plastic. When, for various reasons, rock from the mantle melts, it sometimes moves to the Earth’s surface through weak spots in the crust, releasing heat, gasses, and rock--a volcanic eruption. But why does this solid rock melt and come to the surface?
From Magma to Lava:
Extremely high temperature and pressure can cause the lower mantle to melt and become liquid rock, or magma। When a body of magma rises through the denser rock layers toward Earth's surface, some of it remains liquid. Magma that has reached the surface is called lava.
Lava Types:
Magma comes in different "flavors," or compositions. Each of these will produce a different lava, from fluid, fast-moving basalt to slower, more viscous andesite. Because rocks are made up of collections of minerals that melt at different temperatures, the makeup of the rock being melted affects the magma that results.
Magma that reaches Earth's surface comes in three essential compositions that produce the three common volcanic rock types: basalt, andesite, and rhyolite.
Basaltic magma, the most common form of magma, results from the partial melting of rock in the zone of Earth's mantle called the asthenosphere. Basalt generally has the lowest silica content of the three common volcanic rocks, which makes it the least viscous.
Andesite can arise in a variety of ways, but most is produced by the partial melting of wet basalt. This often occurs at subducting plate margins where oceanic crust dives beneath another plate. Andesitic magma can also be generated by the melting of continental crust. Compared to basaltic magmas, andesitic magmas are normally more viscous and contain more dissolved gases.
Rhyolitic lava is rich in silica and therefore quite viscous. It can arise from the partial melting of continental crust. Because of its viscosity, which results in the magma solidifying before it can reach the surface, rhyolitic lava generally is less common than other forms.