Magma 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 and some natural satellites. Besides molten rock, magma may also contain suspended crystals, dissolved gas and sometimes gas bubbles. Magma often collects in magma chambers that may feed a volcano or solidify underground to form an intrusion. Magma is capable of intruding into adjacent rocks (forming igneous dikes and sills), extrusion onto the surface as lava, and explosive ejection as tephra to form pyroclastic rock.

More Info: en.wikipedia.org