Dissolved gasses under lots of pressure are being trapped in the magma, these expanding gases and steam are what causes it. Also, because of this heat getting more and more hotter, and the volume being lost due to the gasses over time the lava bursts out.