Magma is the molten or semi-molten natural material from which all igneous rocks are formed. It is extremely hot liquid and semi-liquid rock located beneath the Earths surface. Magma is produced by melting of the mantle or the crust in various tectonic settings, which on Earth include subduction zones, continental rift zones, mid-ocean ridges, and hotspots. Besides molten rock, magma may also contain suspended crystals and gas bubbles. During magma's storage in the crust, its composition may be modified by fractional crystallization, contamination with crustal melts, magma mixing, and degassing. When magma flows onto the Earth's surface, it is called lava. Scientists use the term magma for molten rock that is underground and lava for molten rock that breaks through the Earth's surface.