A dam is used to regulate the height of water surface or to store water.
A dam is a barrier that impounds water or underground streams. Reservoirs created by dams not only suppress floods but also provide water for activities such as irrigation, human consumption, industrial use, aquaculture, and navigability. Hydropower is 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. Dams generally serve the primary purpose of retaining water, while other structures such as floodgates or levees (also known as dikes) are used to manage or prevent water flow into specific land regions. The word dam can be traced back to Middle English, and before that, from Middle Dutch, as seen in the names of many old cities. The first known appearance of dam stems from 1165. However, there is one village, Obdam, that is already mentioned in 1120. The word seems to be related to the Greek word taphos, meaning "grave" or "grave hill". So the word should be understood as "dike from dug out earth". The names of more than 40 places (with minor changes) from the Middle Dutch era (1150–1500 CE) such as Amsterdam (founded as 'Amstelredam' in the late 12th century) and Rotterdam, also bear testimony to the use of the word in Middle Dutch at that time.
Source: Wikipedia - Dam