The water running into rivers has mechanical energy. The mechanical energy is kinetic energy because the water flows and potential energy because the water starts from a high level (i.e. a mountain) more info and finally reaches the sea level. The mechanical energy could be converted into electricity.
Usually a dam is build in the bed of a river. An artificial lake is constructed and water is stored there. The water is forced through pipes (sometimes through a tunnel) to an exit where it falls onto the turbines.  which are normally located at lower level.
The turbines rotate that means they acquire kinetic energy. The turbines are connected mechanically - ie a shaft (axis) to a generator that converts the kinetic energy of the turbines into electricity.

If the amount of the water in the river is limited the factory can be built far away from the lake. This increases the height difference between the two points which means an increase the energy that the water has when it falls to the turbines. more info

The dam, the pipelines, the turbines, the generators and transformers, consist a hydroelectric plant.

The electrical energy is transferred by wires from points of production to points of use.

Advantages-disadvantages of hydroelectric plants.more info

Can  a country electrified using only hydroelectric plants?more info

how expensive is a hydroelectric plan?more info

The water cycle.more info
The photo depicts a hydroelectric dam and a factory. At the bottom of the photo a black rectangle appears. The turbines are placed there. The white building on the left is the rest of the plant.If you look carefully you notice another black rectangular (on the top of the dam) and in front of it a concrete runway.
This is used in case of overflow. Each dam is designed to host a certain amount of water (withstand certain pressure). If the water concentrated exceeds this amount the “overflow door” opens and the extra water goes away.
more info
more info
© 2003, Despina M. Garyfallidou Athens-Greece