This article is from the Dog Behavior FAQ, posted to rec.pets.dogs newsgroup. Maintained by Cindy Tittle Moore with numerous contributions by others.
This is symptomatic of a larger problem: why is your dog free to run after cars in the first place? If the dog is being allowed to roam that should be stopped. A car chasing dog is a menace to itself as it may get killed, and is a menace to drivers as people may injure or kill themselves trying to avoid an accident.
Have a few friends drive by (slowly) in a strange car. When the dog gets in range, open the window and dump a bucket of ice cold water on the animal's head/back. Repeat as needed (with a different car) for reinforcement.
 
Continue to: