The molten material is generally called magma when it is beneath the Earth’s surface and lava when it reaches or erupts onto the surface.