I haven't actually used a generator yet, but here's what I've read in various Mondoids and forum posts:
Generators restore power to a single building. This currently must be a pre-existing structure (though support for player bases is planned), and you need an electrician to hook it up. Generators slowly burn fuel to function, and their condition also deteriorates over time. A poorly maintained generator is a fire risk.
Last I heard, gas stations have infinite fuel but won't function after the power is out. Hmm, I wonder if you can set up a generator in one to create an infinite source of fuel...