Installing a backup generator is a wise choice, if you have experienced frequent power outages, especially if those outages are longer than a couple of hours. On the other hand, wiring in a backup generator is not a job for beginners. If you are not familiar with wiring, and what is permitted in your area, you could do more harm than good. If you know what you are doing, and local codes permit, following a sequence of steps can get that backup generator wired in.
Have a licensed, insured electrician install a double-pole, double-throw, transfer switch gear for your backup generator hookup. This may or may not be a code requirement where you live, but if it is not, it should be. This switch will eliminate a dangerous current called "back feed" created when a generator is improperly installed onto existing wiring. Back feed has killed many installers and electrical workers suddenly and unexpectedly when they thought a line was dead, but it was not.
Consider using a transfer panel if you cannot afford a transfer switch. This is basically a sub-panel with breakers that gets its power from the main power panel for the house. The main panel and the sub-panel would have interlocking handles preventing both from being open or closed at the same time, thus preventing deadly back feed.
Refer to electrical charts and tables available from your electrical service provider to calculate your specific circuit load needed. Buy the breaker, and match the wire size to the breaker you buy, according to the electrical charts. For instance, if you calculate a need for a 30-amp breaker, you need to buy a 10-3 size wire with ground, according to the chart. A 40-amp breaker requires an 8-3 with ground, and a 50-amp breaker must have a 6-3 with ground.
Use the wire cutter/stripper to install a breaker for the generator panel into the main panel for the house and a screwdriver to tighten the set screws. Wire in the breaker into the main panel, and run that wire to the sub-panel. Install correctly sized main breakers into the sub-panel. Mount a dual supply breaker, service disconnect kit and interlocking handle into the sub-panel. These may be sold as a kit or by piece. Install the wire from the main house panel onto the main breaker you just installed into the sub-panel.
Route the same size wire from the second main breaker in the sub-panel to the generator. Install the wiring onto the generator. Finally, install additional breakers into the sub-panel. You will use these breakers to send the generator's power to the house appliances you want the generator to power during an outage.
Use a load calculation chart to calculate load for your size generator, since smaller generators may be inadequate for the load you need.
If these steps are unclear, do not attempt this installation.