Most electricity generation (apart from solar) works in a similar way. You use a force to spin a turbine round. This moves magnets and wires around and around to create electricity in the wires.
So, the thing that differs between different ways of making the electricity is: HOW do you make the turbines spin?
In a hyroelectric dam, you build a big wall (the dam) across a river valley. This means the water can’t get through, so builds up behind the dam. As more and more water builds up behind the dam, it presses harder and harder on the dam as it tries to get through.
When you need electricty, you can open a small gap towards the bottom of the dam to let some water through. With so much force behind it this water rushes through with a massive force. If you place a turbine on the other side of this small gap, then the water rushing through will make the turbine spin round really fast – which moves magnets and wires around each other to create electricty.
In conventional power stations, all the happens is to burn stuff (e.g. coal or gass) to heat water, which turns into steam, and it’s the steam that makes the turbine round. The disadvantage here, though, is by burning stuff you’re making carbon dioxide which could make climate change worse. In a hydroelectric dam, you are just using water that was already in nature so, providing the dam is built in a sensible place, there’s no harmful by-products.