The National Park Service explains that geysers work based on a combination of heat, water and underground plumbing system. Without any of these three parts, the geyser cannot spray its steam into the air. The heat in a geyser is provided by an underground chamber of magma, or molten material, beneath the earth's surface. This heat radiates to the surrounding rock, which may have the ability to heat underground water.
When it rains or snows, the water from those events can work its way underground through fractures in rocks near the surface. When this water comes into contact with hot rock, it begins to move back toward the surface. As the water moves upward, it passes through volcanic ash or silica-rich lava. The water dissolves this material and carries it upward toward rock crevices closer to the surface. This can cause the rocks above to narrow and hold the increasing pressure. This creates the plumbing the geyser needs. Finally, the water nears the surface. As it does, the pressure drops, causing the water to flash into steam at the surface and create a geyser.
The National Park Services shows that hot springs work in a manner similar to geysers. However, hot springs lack the underground plumbing system needed to build the pressure and create a geyser.