A dam is a barrier that impound
A reservoir , artificial lake or dam is used to store water.Reservoirs may be created in river valleys by the construction of a dam or may be built by excavation in the ground or by conventional construction techniques such as brickwork or cast concrete.The term reservoir may also be used to...

s water
Surface water
Surface water is water collecting on the ground or in a stream, river, lake, wetland, or ocean; it is related to water collecting as groundwater or atmospheric water....

 or underground streams. Dams generally serve the primary purpose of retaining water, while other structures such as floodgates or levee
A levee, levée, dike , embankment, floodbank or stopbank is an elongated naturally occurring ridge or artificially constructed fill or wall, which regulates water levels...

s (also known as dikes) are used to manage or prevent water flow into specific land regions. Hydropower
Hydropower, hydraulic power, hydrokinetic power or water power is power that is derived from the force or energy of falling water, which may be harnessed for useful purposes. Since ancient times, hydropower has been used for irrigation and the operation of various mechanical devices, such as...

 and pumped-storage hydroelectricity
Pumped-storage hydroelectricity
Pumped-storage hydroelectricity is a type of hydroelectric power generation used by some power plants for load balancing. The method stores energy in the form of water, pumped from a lower elevation reservoir to a higher elevation. Low-cost off-peak electric power is used to run the pumps...

 are often used in conjunction with dams to generate electricity. A dam can also be used to collect water or for storage of water which can be evenly distributed between locations.
The word dam can be traced back to Middle English
Middle English
Middle English is the stage in the history of the English language during the High and Late Middle Ages, or roughly during the four centuries between the late 11th and the late 15th century....

, and before that, from Middle Dutch
Middle Dutch
Middle Dutch is a collective name for a number of closely related West Germanic dialects which were spoken and written between 1150 and 1500...

, as seen in the names of many old cities.