A dam is made when you block a river so that the water forms a lake behind it. Dams were originally used as a way to store water for humans and animals. The first one was built in Egypt by the Pharoah Menes in 2900 BC.
The water is released through pipes and turbines which turn and create energy which can be converted into electricity.
When a river is dammed, land including farmland and houses is flooded and the natural flow of the river is disrupted. This can cause many plants and animals to die, for example salmon fish can’t get upstream to breed. A lot of animals and humans will also be forced from their homes resulting in many problems.
Hyrdo-electric power dams are very expensive to build but once built they are very easy to maintain and reasonably efficient to run. Water is renewable and no air pollution is made. In the UK they only produce about 2% of electricity in this way but this probably won’t increase.