Cool ground water near the surface percolates down into the earth. As it approaches a heat source below, such as a hot magma chamber, it is steadily heated towards its boiling point. However, at the boiling point the water does not convert into steam. This is because it is deep below the ground and the weight of cooler water above produces a high confining pressure. This condition is know as "superheated" - the water is hot enough to become steam - it wants to become steam - but it unable to expand because of the high confining pressure.
At some point the deep water becomes hot enough, or the confining pressure is reduced, and the frustrated water explodes into steam in an enormous expansion of volume. This "steam explosion" blasts the confining water out of the vent as a geyser