A dam is a barrier constructed to hold back water in a river or lake…

… And control the amount of water that flows downstream.

So why do we build dams?

These constructions can be used to divert a river or stream to irrigate crops…

… Or to protect houses from the risk of floods when there is a sudden rise in water level because of heavy rain.

In this case, the dam holds back the excess water until the rain stops. Then the sluice gates are opened and the reservoir is slowly emptied.