Magma (from Greek μάγμα "mixture") is a mixture of molten or semi-molten rock, volatiles and solids that is found beneath the surface of the Earth, and is expected to exist on other terrestrial planets. Besides molten rock, magma may also contain suspended crystals and dissolved gas and sometimes also gas bubbles. Magma often collects in magma chambers that may feed a volcano or turn into a pluton. Magma is capable of intrusion into adjacent rocks, extrusion onto the surface as lava, and explosive ejection as tephra to form pyroclastic rock.
Magma is a complex high-temperature fluid substance. Temperatures of most magmas are in the range 700 °C to 1300 °C (or 1300 °F to 2400 °F), but very rare carbonatite melts may be as cool as 600 °C, and komatiite melts may have been as hot as 1600 °C. Most are silicate mixtures.
Environments of magma formation and compositions are commonly correlated. Environments include subduction zones, continental rift zones, mid-ocean ridges and hot spots. Despite being found in such widespread locales, the bulk of the Earth's crust and mantle is not molten. Rather, most of the Earth takes the form of a rheid, a form of solid that can move or deform under pressure. Magma, as liquid, preferentially forms in high temperature, low pressure environments within several kilometers of the Earth's surface.
Magma compositions may evolve after formation by fractional crystallization, contamination, and magma mixing. By definition rock formed of solidified magma is called igneous rock.
While the study of magma has historically relied on observing magma in the form of lava outflows, magma has been encountered in situ three times during drilling projects—twice in Iceland, and once in Hawaii.