First thing to decide once you have determined that you are going to buy a generator is what type of generator do you want/need? There are two types of generators: portable and stand-by. Portable generators are normally about the size of a cooler and runs on gasoline. Stand-by generators are hard-wired into your house and start at the size of an outdoor air-conditioning unit (and get larger).
Portable generators are an excellent choice for many people that only need to run a few appliances for a short period of time (e.g. you only lose power for a few hours/days each year). To use a portable generator, you have to plug in your appliances to an extension cord instead of the wall outlet. When the power goes out, someone needs to go down and start the generator manually and plug in the urgent appliances. Since these generators tend to use gasoline, you need to store enough gasoline to sustain use for a period of time, and the fuel needs to be cycled to be kept fresh. Also, one of the other main points to remember with portable generators is the notation on it that may say something to the effect of "10 hours @ 1/2 load". This means the generator should run for 10 hours if you are only pulling half of that number on the front (10 hours putting out 2500W on a 5000W generator). This is important in helping guestimate the amount of gas needed on hand.
Stand-by generators are the choice of many who are in hard-hit areas that lose power often/for long periods of time. These generators are hard-wired into your house, so that your appliances can be kept plugged into the wall outlets, and you don't need to muck about with anything. These also have the option of being able to automatically detect when the power to the house is out and they can start themselves with only a few second delay. These normally are directly connected to a Liquid Propane tank or a natural gas line so the fuel is provided for.
So once you have weighed the pros and cons of each type, and you have made your decision, then you need to determine the size of what you need. This part is rather generic for either style. Every appliance you have uses a certain amount of power per hour. Lowe's has a listing of power usages here, and there are more available out there if you look. Now, along with the amount of power it takes to run an appliance, many appliances have a "start-up" power usage. Obviously, this is the amount of power it takes to get this appliance from off to running. When you are calculating your power requirements, you will need to use the start-up Wattage ratings as your guide.
Using some "standard" guides, here's a quick example. I have a freezer in the basement, a fridge upstairs, and a well pump to run. I will say that all lighting will be done by oil lamps and candles for this example. The freezer and the fridge both have startup Wattages at around 3000W, and the well pump is probably around 3200W. What this means is that with the 5.25kW generator that my family has, we can not power all three (or even any two) at the same time, BUT as long as we rotate our usage, we should be just fine.
So at this point, I think I've given you plenty to think about, but I hope this helps you think about your power and what would happen if. Also, I hope if you have been thinking about getting a generator, but didn't know where to start... well, there ya go. (Ok, heck, I'm just glad you read it!)