Electricity can be produced in various ways. Such as gravity-driven hydraulic power plants and pump-driven hydraulic power plants.
This power plants use potential energy given by the hight water stored in a dam, transforming it into kinetic energy.
The different kinds of power plants, depend on the destination of the water.
Then that kinetic energy that moves the turbines produce electricity.