The majority of electricity reticulation uses alternating current (AC). This is because it is easier to produce electricity this way. The power lines can also run extremely high voltages, which dramatically reduces losses over distance and allows for thinner conductors as well as lighter pylons (for a lower cost). A transformer is used to reduce the voltage close to the consumer.
AC cannot be stored. You can use the AC to drive a motor that has a large or fast flywheel. Once the power is restored, let the flywheel coast with a regular top up until the power is gone. The flywheel can be used to spin an alternator, which is often the same machine as the motor. Technology today does not allow for flywheels capable of storing the excess energy that a power grid may provide. 20 Megawatts is the limit, but not enough for cities or industry.
Alternately, AC can also be converted into direct current (DC) to store in a battery. Batteries are inefficient at taking up charge and are expensive. They are also not capable of storing the power we need.
The most efficient and practical way to store power at the moment is to use surplus power to pump large amounts of water to higher-level reservoirs during low-demand periods. This is because we cannot easily throttle back power stations. Then, during peak demand when power stations are under heavy load, let water flow through turbine generators to retrieve this “stored power”.
Although this isn’t a very efficient way to do things, it allows storage in the order Megawatts or Gigawatts, which is more than most flywheels or batteries can hold.
Cool technologies to store electricity include heated, molten salt and compressed or liquid air. The “cool” technologies for storing electricity as heated, molten salt, compressed or liquid air, hydrogen, and electric vehicles (i.e., more batteries) are inefficient, risky, expensive, or too risky to be used on a large scale. There is a lot of incentive to keep researching these technologies. We can also anticipate that some of them may become practical on large scales eventually.