electricity created by the flow of water turning a turbine
Energy is added when the Sun shines on the ocean, evaporating water from the surface that becomes water vapour and eventually forms clouds. This process gives the water a lot of potential energy due to its height. When the water falls as rain on the mountains and is collected by dams, it is used to drive water turbines and generators to produce hydrolectricity.
Short answer: Water behind a dam escapes through a hole, turning a turbine and generating power. Long answer: The easiest way to generate electricity, and the way that we pretty much always use (except with solar panels), is to spin a coil of wire between some magnets. (You could do it the other way and spin the magnets inside a coil, but magnets are heavy so normally we don't do it that way.) So that means we need a way to make this thing spin. For that, we use a turbine, which is basically a bunch of windmill-type blades stacked in front of one another that we can push water or air or steam through to get them to turn and make our coil spin. Now, the easiest way to get something to move is to drop it, i.e. to let gravity pull it for you. So in hydroelectric power, we build a dam to keep water from running downhill (i.e. increase its gravitational potential energy), then open up a gap in the dam and put a turbine there, so that when the water runs downhill, it turns the turbine, and we get beautiful clean electricity.