It's basically a giant storage battery.
Actual batteries would be impossibly huge. Other methods for doing this have involved storing pressurized gas in underground reservoirs, but the simple hydro systems can often make use of existing dam structures and hydroelectric generators, and are very straightforward.
