I do a lot of background development as far as the setting, locations, characters, and motivations go.
I do a moderate amount of planning as far as plot points. I usually put together a plan that completes a plot arc, but don't get too involved in the details.
But, as Clausewitz says, "no plan survives first contact with the enemy" -- in this case, "enemy" being "players". So I wing it from there. I think the best part of gaming is when I've got a plan, and then one of the players says "What about ..." and I think "Dang, I wish I'd thought of that. Now what will the reaction be?"
Mij