system
Given the following post, respond as if you're commenting on Reddit:
human
How does mixing magmas of different types cause large explosive volcanic eruptions?

I've read from several different sources that when a fresh injection of basaltic magma intrudes into a more silica-rich magma chamber under a volcano, some sort of reaction happens that ultimately leads to a large explosive eruption. I've specifically heard this implicated for the 19th century Krakatoa eruption, where people point to volcanic rock of varying color bands indicating partially mixed magmas that cooled preserving the different rock types. 

However, these sources don't mention a mechanism for this. Is there some sort of chemical reaction between the different magmas? Is it a physical reaction relating to different temperature/density/viscosity/gas content/something else?

What leads two bodies of relatively stable magma to generate immense pressure and explode when mixed together?
gpt
Temperature difference. The lighter felsic magma in the primary chamber had been cooling down for some time. This theory around the magma mixing, involved a darker body of much hotter and more mafic magma intruding into the chamber. This caused a pressure spike, followed by the very large kaboom.

The other theory is a phreatic eruption, where a collapse in the base of the volcano wall resulted in seawater flooding the chamber - and steam from this contact with the magma resulting in the eruption.

Evidence of both theories exist, but either way it doesn't involve any fancy chemical reactions.