I happen to be very sensitive to electrical shock, so those little (and sometimes not so little) snaps of static electricity really hurt. Here's what I do to try to prevent this.
Getting out of the car often results in a spark of static electricity hitting me in the calf as my foot hits the ground. Sliding or turning on your seat cover tends to build up a charge, especially in cold or dry weather. Getting zapped in the calf can be avoided by holding onto the metallic part of your door as you get out and step to the ground.
Walking across a rug will sometimes build up a charge in you. Sometimes pushing a shopping cart around on the vinyl floors of the place that you shop will somehow do the same thing. Hold something metallic in your hand, such as one of your keys, and touch something metallic in the store or wherever you are once in a while. You can sometimes see a big blue spark jump from the end of your key to the metal and/or hear the snap. If you've built up a very large charge, you may even feel a bit of a jolt in your arm, but it's not painful - just a bit of a surprise.
If you are in a chair at a desk and get up you will sometimes get a static shock. If at all possible, touch something metal (like a nearby filing cabinet) as you get up and the static will drain off as you stand. If nothing metal is within reach (or you find that all of the static does not drain off), try the metal key technique from the above paragraph.