Eventually, the heated groundwater begins to slowly rise to the surface through the weak spots (cracks and fissures) in the overlying rocks because it is less dense than the cooler water above it. As the water rises, so do gasses, which releases some of the intense pressure. Once the water and gasses escape at the surface, more heat energy and pressure are released, which allows more water to rise up to the surface and leads to an eruption in the hot spring. This eruption is called a geyser.
This diagram of Beehive Geyser also explains how most geysers work.

Castle Geyser has the largest cone made of sinter (like Beehive Geyser's cone shown above) and may be the oldest geyser in Yellowstone. Castle Geyser erupts about every 10 - 12 hours, shooting water about 90 feet into the air, and lasts about 20 minutes. The water eruption is followed by a noisy steam phase that lasts around 30 to 40 minutes.
This video shows Castle Geyser's water eruption:
This video shows the steam phase following the eruption: