Consider this: If you provide electrical energy to an appliance it will give an output energy, let's say a drill. If you feed it (electrical) energy it will give out (cutting) energy. Now let's do a switch.
Reverse the roles: Attach some form of rotation to the drill, e.g. (fan blades) to make the motor turn without any aids, other than the fan blades turning in the wind. The motor will then produce an output at its 'Input' end, (where the battery or mains were connected). This is now called a 'Generator'. This 'reversed' output can be captured and used to 'charge' batteries which can be used as 'Stored Energy' at any time that it is needed. With advanced circuitry this 'energy' can be directed to 'Local' or 'National' use.