As the magma from the volcano rises up it begins to settle as crystals and causes the chemical compositions to change and the magma has less of magnesium and more of the silica contents.
A volcano that has more of silica oxide and a high temperature but low silica contents results in a more fluid or basaltic magma and a high content result in a viscous magma and they are of high explosive in nature like the Stromboli volcano and Mount Vesuvius.
The water would keep the magma at the same temperature restricting it from getting hotter keeping the temperature at melting point but not enough to turn into a flowing liquid