If your generator is NOT auto-starting after power failure, you would need to design a system to accomplish the following tasks:
1) You need a standby power source for starting the generator and powering some circuits, e.g. a battery well of appropriate size,
2) A mains-failure detection circuit to send a signal to the electric starter on your generator (or which shocks some standby servant boy to yank the pull starter). Said circuit must discriminate whether the failure is a brown-out (voltage sag) or black-out of sufficient duration to start the generator,
3) A timer circuit allowing Mr. Generator time to warm up and stabilize (and a circuit to monitor whether it's stable),
4) A circuit to drive a contactor (heavy duty relay) to switch your house (or other load) to the generator.
5) A circuit to detect when mains power comes back, and is sufficiently stable,
6) A circuit to reverse all the above once the proper conditions are met.
Also, for such a system, one would need to provide for very regular maintenance of the generator. That is, making sure fuel and oil levels are always appropriate, and exercising the unit at proper intervals, etc...