In volcanology, magma is melted rock that is under the ground. There are many types of magma. One is called felsic magma. Felsic magma is thick and has lots of a mineral called silica. It mostly makes light-coloured rocks. Another type is called mafic magma, which is runny and has less silica. It usually makes dark-coloured rocks. A third type is intermediate magma. It is like both the other types.
When magma becomes solid it's usually by cooling slowly, far below the surface. This makes "plutonic" rocks such as granite. When magma comes out from the ground in a volcano and it is still melted, it is called lava. Lava cools more quickly, and forms other kinds of rock such as basalt.