They essentially work the same as a coal or nuclear power plant, the main difference being the heat source. With geothermal, the Earth's heat replaces the boiler of a coal plant or the reactor of a nuclear plant.
Hot water or steam is extracted from the Earth through a series of wells and feeds the power plant. In most geothermal plants the water pulled up from the ground is returned back to the subsurface. The rate of water used is often larger than the rate of water returned, so make-up water supplies are generally needed.
There are 3 main types of geothermal power plants, with the flash cycle being the most common. The choice of plant depends on how much geothermal energy is available, and how hot the resource is. The hotter the resource, the less fluid needs to flow from the ground to take advantage of it, the more useful it is.
Dry steam plants
These plants use dry steam that is naturally produced in the ground. This steam travels from the production well to the surface and through a turbine, and after transferring its energy to the turbine it condenses and is injected back into the Earth.
These types are the oldest types of geothermal power plants, the first one was built back in 1904 in Italy. Because this type of power plant requires the highest temperatures they can only be used where the temperature underground is quite high, but this type requires the least fluid flow.
The dry steam plants at the Geysers in northern California, first drilled in 1924, are the largest geothermal source of electricity. At their peak production in the late 1980s they produced a whopping 2 GW of electricity - the equivalent of two large coal or nuclear power plants.
However due to high rates of extraction, power has since declined to 1.5 GW of capacity, with an average output of less than 1 GW.
Flash cycle steam plants
These types are the most common due to the lack of naturally occurring high-quality steam. In this method, water must be over 180°C, and under its own pressure it flows upwards through the well. This is a lower temperature than dry steam plants have.
As its pressure decreases, some of the water "flashes" to steam, which is passed through the turbine section. The remaining water that did not become steam is cycled back down into the well, and can also be used for heating purposes. The cost of these systems is increased due to more complex parts, however they can still compete with conventional power sources.
Binary cycle plants
Binary power plants are expected to be the most commonly used type of geothermal power plant in the future, as locations outside of the known hot spots begin to use geothermal energy.
This is because binary cycle plants can make use of lower temperature water than the other two types of plants. They use a secondary loop (hence the name "binary") which contains a fluid with a low boiling point, such as pentane or butane.
The water from the well flows through a heat exchanger which transfers its heat to this fluid, which vaporizes due to its low boiling point. It is then passed through a turbine, accomplishing the same task as steam.