A reservoir or cistern is a type of player-built construction to contain water or magma. It is most useful to store the sparse water in scorching or freezing maps, or in any fortress as a means of ensuring a consistent water supply is maintained despite conditions of the surrounding biome.
Reservoirs are relatively basic in construction, consisting of walls arranged in such a pattern as to form a closed container, complete with floors and a floodgate in order to access the stored contents. Getting the desired contents from their place in the world to your reservoir is another thing entirely, something where mechanics will likely assist you.
Usually reservoirs are made refillable (obviously, because water in them will eventually run low) and therefore can be made autorefillable with pressure plates or refilled manually by levers. If the reservoir is used for drinking, it is highly recommended to disconnect the reservoir from the water source after filling in order to prevent the water from being contaminated or invaded by amphibious creatures (carving a fortification can help with building destroyers).
Reservoirs are very useful to supply fortresses with water during cold seasons in temperate or cold climates. For example, a secured 20x25x1 underground reservoir can last for many years without needing to be refilled, even in a sober fortress.
Reservoirs are essential structures in any fortress containing an ocean biome as pumping water through a screw pump into them is the only way to desalinate the water present, allowing dwarves to actually use it. If desalinated water comes into contact with salty water, the entire reservoir will become permanently salty.