I'm assuming your talking about hooking up a small 6000 watt or less portable generator?
I could never recommend just running extension cords outside to it. Cords get crushed around doors can easily become a fire hazard, also most people don't bother to properly ground their portable generators. Dumb dumb dumb.
The best way it to have a sub panel box installed with an interlocking transfer switch. And have that feed the circuits you want backed up.
Then you would need to install an outdoor 30 amp male connector where you would connect to the generator.
This way the process is as easy as wheel the generator outside, plug it in, start it up, and go flip the interlocking transfer switch and voilà, Power.
This also ensures that your generator will be properly grounded. Very important since a lot of people don't bother to shut them off to refuel, dumb dumb dumb.
However many of the big box home improvement stores now have generators capable of whole home backup. That can run on LPG or NG and have automatic transfer switches that will ensure your never without power for more than a few seconds
Ricks tier, this is good advice above. I have 8 generators here on the farm, ranging from 5500 watt single phase propane units up to 225kw diesel sets, with a lot of 9kw- 12kw units.
Some random thoughts.
First choice for fuel (if it is available ) would be natural gas. NG rarely is in short supply during a widespread outage, so you don't have to worry about running out of fuel or the fuel going bad.
Second choice is propane, as it too does not go bad. Figure on about .25 gallon per hour of fuel consumption per 1k watts. A 125 gallon propane tank will operate a 5500 watt generator for around 3.5 days.
Personally I prefer diesel as my 3rd choice, because these units are usually industrially rated and also because I usually have several hundred gallons of fuel available on my farm at any given time. Gasoline is my 4th choice, but if you don't have diesel fuel avail you should consider it for your 3rd choice.
Often times during an outage the local gas stations are closed due to lack of power. You need to have a strategy for having fresh fuel available.
A whole house generator with an automatic transfer switch (ATS) is the ideal solution as it starts and transfers the load automatically if you are not around. It's also the most costly. An ATS is also usually set up to start and exercise the generator weekly, as many people find that when they need their generator during an outage it won't start because it has been sitting unused for 2 years...
Second best option is a smaller generator that only operates the critical circuits via an ATS wired to a dedicated sub panel. This is what I have backing up my own home. The well pump, livestock fences, barn lights, and household circuits such as kitchen, bathroom, master bedroom, tv/computers and furnace are all wired to the sub panel. If I am not home and the power goes out my wife does not have to do anything - the critical circuits are powered up automatically.
Next option down the list is to use a manual transfer switch in lieu of an ATS, preferably hooked to a sub panel.
Next down is the extension cord route.
You can spend anywhere from a few hundred bucks up to 20k or more on a system.
Some of the best brands are Kohler and Cummins Onan for large generators. EPS also makes a very good unit.
Personally I have seen too many failures on Generacs to be comfortable recommending them.
It's a good idea to exercise your generator every month or two when you are not using it.
Scott