Answer:
Despite how volcanic eruptions are shown in movies and shows, they're not always so explosive and violent. If magma is thin and runny, gases can easily escape; however, if magma is thick and sticky, gases have a hard time getting loose. Pressure gradually builds up until the gases escape violently and explode. BOOM!! ...
There is much more involved with volcanic eruptions but I hope that provides the information you wanted!!