The type of magma in the Earth can create different volcanoes.
If the magma is quite thin, the gas can escape easily and there will not be an explosion. The magma just comes out of the mountain and flows down the sides, like volcanoes in Hawaii and Mount Etna.
But, if the magma is thick and sticky, the gas cannot escape, so it builds up and up until it explodes.
This can cause landslides and sends out huge clouds of burning rock and gas, which devastate everything around them, like the famous eruptions at Mount St Helens and Montserrat.