Every time two dissimilar insulators rub together, there will be a relative buildup of charge due to the triboelectric effect. In essence the two materials stick together briefly, and when they unstick the electrons may prefer to stay with one surface and not the other. This happens summer or winter.
The reason you get "shocked" more in winter has to do with the conductivity of the air - which in turn is largely determined by the absolute moisture content. Not the relative humidity, but the absolute. You can see some evidence of this in an earlier answer on a related topic. This is why the effect is usually worse in winter - when the external temperature is lower, the saturated vapor pressure is lower as well. So even when it's raining outside, if it's only 1°C the absolute humidity will be low.
As for why this happens more to some people than others: mostly this is due to clothing preferences - some materials are just more susceptible to the effect (more electrically dissimilar than others). The fact you often notice this when getting out of a car in winter can be explained in part by (a) materials of the car seat, (b) you "slide" off the car seat, so lots of friction, and (c) you touch metal immediately after charging up, so there is less time for the charge to dissipate.
As for "how to prevent": in environments with sensitive electrical components the floor is usually treated with a (slightly) conductive compound, and people wear a heel strap that connects their skin (around the outside of the shoe) to the floor - see this image from ultrastatinc.com:
They also wear a conductive wrist strap that is grounded at the workstation (usually with a high resistance in series, so if they touch a live part they don't get electrocuted).
But the rest of us mortals have a few other options. Humidifiers (keep the air moist - also helps your skin) are very effective. The choice of shoes, clothing, and flooring material can help a bit (treat your carpets with antistatic spray). But when you are out and about, and you fear touching that metal door handle, I usually use one of these tricks:
- hit the object quickly with the back of your hand (where you have fewer nerve fibers). You still get the discharge, but your body can't tell the difference between the shock and the slap (you do have to hit fairly hard for this to work).
- Touch the object with a poor conductor - the current will flow more slowly. Product idea for engineering colleges: make your class ring "stone" out of a slightly conductive material so it can serve this purpose - geeky and practical. Touch the door with your ring before you go through
- If you have a key, coin etc, you can touch the metal part with that: the "spark" (which is more painful) will jump to the coin, and then the current will distribute over a wider area (the fingers holding the coin). Quite effective at reducing the local pain of the shock, although you still get a little jolt up your hand. The key is my preferred method - easier to find in my pocket, and usually needed anyway when I approach a door.
Whether touching wood will help you is questionable. Usually dry wood is not a good conductor - but depending on the surface finish, wood may be somewhat conductive. From brittanica.com:
Oven-dry wood is electrically insulating. As moisture content increases, however, electric conductivity increases such that the behaviour of saturated wood (wood with maximum moisture content) approaches that of water.
Thus wood may be a suitable high resistance medium for a slow discharge - but unless you specifically made a piece of wood of known properties, I would not count on it.