Magma is the molten material beneath the Earth's crust.
It usually collects in a magma chamber beneath a volcano, and can then be injected into cracks in rocks or issue out of volcanoes in eruptions.
The temperature of magma ranges between 700 C and 1300 C.
When it reaches the surface and comes out of a volcano, magma becomes lava.
There are actually different kinds of lava depending on its thickness or viscosity.
The thinnest lava can flow downhill for many kilometers, creating a gentle slope.
The thicker lavas will just pile up around the volcanic vent and hardly flow at all.
The thickest lava doesn't even flow, it just plugs up the plumbing of a volcano and can be the cause of violent explosions.
So the different between magma and lava is location.
Magma is deep underground in chambers beneath volcanoes and lava is the stuff that comes out of volcanoes.