Almost all crustal rocks have some amount of porosity (i.e. the volume fraction of the entire rock that is not composed of solid minerals, like holes in swiss cheese) either through the natural packing configuration of grains or fractures on crystalline rock. All the porosity in these rocks is completely filled with water (except for the rare occurrences of hydrocarbons, CO2, etc), from the surface to large depths where the water is absorbed by the surrounding minerals through chemical reactions forming new hydrous minerals precipitated in the place of the porosity. So there is a depth at which no more porosity exists and water cannot keep going down.
Then, as others explained, through crustal recycling, the hydrous minerals are exposed to incredibly high temperatures when they make contact with the mantle. This generates a melt that includes water in the form of bubbles. In fact, the presence of water drops the melting point of the entire rock allowing this to happen at relatively shallow depths. Then that melt makes its way up through more crustal rock, taking in all the water in its path, and releasing everything at the surface in the form of a volcano. Also, water surrounding the path of the melt may also be heated and its pressure raised such that it ejects at the surface through fractures in what we call geysers.