Magma is a liquefied mixture of rock, crystals and dissolved gas. While this fits the general description of magma, it has three distinct observed types: basaltic, rhyolitic and andesitic.
Magma types tend to consist of mixtures of silicon dioxide, or molten sand/glass, combined with a varying mix of iron, magnesium, calcium, sodium and potassium, according to Tulane University. This variance is what determines magma's classification. Basaltic magma is high in iron, magnesium and calcium but low in sodium and potassium, while rhyolitic magma is the opposite.
Gases in magma consist mostly of water and carbon dioxide, with small amounts of sulfur, chlorine and flourine gas. This gas is kept dissolved within the magma due to the high pressure involved but escapes to the surface should the pressure on the magma be relieved. Gases emerging from magma are what create its volatile behavior, and in turn, they are largely what cause eruptions. The gas content in different varieties of magma can vary, with rhyolitic magma carrying a very large measurable amount.
Magmas of different types have varying properties, such as viscosity and the observed temperature at which they commonly erupt. Magmas that have higher viscosity have a greater chance to erupt at lower temperatures due to the amount of gas found within them, for instance.