The world needs a new source of energy, an unspillable source.

How do solar plants and hydroelectric dams generate electricity?

Can anyone explain to me in a simple way how solar plants and hydroelectric plants generate electricity? I’ve done research, but I’m a little confused.

Please note, I am not asking how solar panels work. I want to know how solar PLANTS generate electricity.