The majority of magma erupted at Earth's surface is produced by melting of mantle rock at depths of less than 100 km. Some magmas are also produced by melting of crustal rocks at shallower levels (less than 30 km). The Earth's interior is very hot, but it is mostly solid because of the high pressures at depth in the Earth. The main process of melting occurs when mantle rock rises toward the surface, such as at mid-ocean ridges, and undergoes decompression melting, without the addition heat.
Simulate decompression melting of mantle rocks using the interactive module below.
Magma can also be generated by melting due to the lowering of the mantle melting temperature because water and other volatile components have been introduced into the mantle. The occurs chiefly in subduction zones where oceanic lithosphere is descending back into the mantle (see the figure here).
The oceanic lithosphere carries with it water bound in sediments and altered rocks, and releases that water under increased pressure and temperature at depth within the Earth.
The chemical composition of magma reflects the composition of the rocks involved in the melting process. There is a large range of magma compositions erupted at the Earth's surface. The most common magma is called basalt, a silicate liquid with a SiO2 content of about 50%. In general, the SiO2 content of magma varies from about 45-75%, with low-silica magmas referred to as mafic and high silica magmas, felsic. There is a continuum in the composition of magma types between these two end-members.