oDO pull over as soon as you safely can. If you keep driving you could be charged with fleeing and eluding, a felony.
oDON'T keep driving home, even if you're close.
Speaking with the Officer
oDO be polite with the officer. Address him/her as sir/ma'am or officer.
oDON'T volunteer information. "Where were you going?" "Home." NOT "Home, I was just coming from the restaurant where I only had two beers, I swear!" You could give the police more ammunition against yourself by offering more information than should. Don't be your own worst enemy.
If they ask to search your car
oDO lock your door if they ask you to get out of your car. Why? It gives the officer one more obstacle before searching your vehicle. If they ask you why you did it, just say you always lock your car...don't you?
oDON'T consent to a search of your vehicle or your person. Just say no. If they ask "do you have something to hide?" just say "I'd just like to go home" or something similar. Other common concerns are "they will search it anyway". Well, they might, but if you consent, there is little a lawyer can do to help. But if you object and then they search anyway, your lawyer might be able to keep anything they may find out of court. If you don't, then that's one less tool they have to fight for you. Now lots of people think "of course I don't have anything to hide!"...but do you know everything in your car? Everything that anybody who's been in your car may have left behind? Do you want to risk your liberty on that? Just say no to the search.
Ask to leave, but don't say anything else
oDO ask if you are free to leave. An officer is only supposed to keep you there about long enough to investigate why they pulled you over and then write a ticket. But they don't have to tell you that you can leave, unless you ask.
oDON'T say anything about your case to anyone but your attorney. That includes to the officer, the judge and your friends or family. When they say "you have the right to remain silent", exercise that right. I've seen even innocuous statements come back to haunt clients time and again. And just because you say something before they read you your rights doesn't mean that statement doesn't come in; it can and will. Police only read someone their rights when they arrest them, so that shouldn't happen if they just give you a traffic ticket, but it still doesn't hurt to keep your mouth shut. Simple traffic stops can escalate into criminal cases when drivers don't follow the above advice.
Additional resources provided by the author
Those points are just the tip of the iceberg; there are whole books on this subject. The main thing is that if you have a traffic ticket or a criminal case, get an attorney and don't talk to anyone except your attorney about what happened. They are there to help you, and if you follow the above advice, you make it easier for them.
You can find a qualified attorney in your area here at Avvo, at www.nacdl.org (the National Association of Criminal Defense Lawyers), or by checking with your local Bar Association.