Magma mixing is the process by which two magmas meet, comingle, and form a magma of a composition somewhere between the two end-member magmas.
Magma mixing is a common process in volcanic magma chambers, which are open-system chambers where magmas enter the chamber, undergo some form of assimilation, fractional crystallisation and partial melt extraction (via eruption of lava), and are replenished.
Magma mixing also tends to occur at deeper levels in the crust and is considered one of the primary mechanisms for forming intermediate rocks such as monzonite and andesite. Here, due to heat transfer and increased volatile flux from subduction, the silicic crust melts to form a felsic magma (essentially granitic in composition). These granitic melts are known as an underplate. Basaltic primary melts formed in the mantle beneath the crust rise and mingle with the underplate magmas, the result being part-way between basalt and rhyolite; literally an intermediate composition.