While you are driving a car, if a police officer has reasonable suspicion or probable cause to believe that a violation of the Vehicle Code has been committed or a crime has occurred, you may be pulled over. You will probably be asked to show your driver's license, the registration to the vehicle, and proof that the vehicle is insured. You must comply with these requests.
The best thing to do in this situation is to pull over, stay cool and calm and remain in your car, unless told to do otherwise by the police officer(s).
If you are stopped at night, turn on your dome light and show the officer that there is nothing wrong, or any reason to fear for his or her safety. It is best not to make any sudden movement or do anything that would give the officer a reason to search further. Having your light on and keeping your hands on the steering wheel will usually put the officer's mind at ease.
Remember the officer cannot read your mind, he or she does not know if you're a law-abiding citizen or a criminal, and unfortunately for his or her safety, must assume the worse case scenario at first. Only, when you are asked for your ID, should you go about getting it. At this point, you may start to explain or question what you were doing that caused you to get stopped, but that is as far as you should take it.
Ticket / Warnings
There is a chance that the officer will write you a ticket or warning notice for a traffic violation. When the officer asks you to sign the ticket or warning notice, it is not an admission of guilt, you are simply acknowledging that you received it. If you refuse to sign, the officer will still issue the ticket but will mark it "Refused."
The officer may legally start to check your car for equipment code violations under the vehicle code. Be careful about how you protest. This is not the place to argue your case.
Protest In Court
If you feel that you are getting a ticket for something you didn't do or for something that is not fair, you should take your protest to court and explain your case to the Judge. Just because the officer gives you a ticket, does not automatically mean that you are guilty, or will be found guilty, or that you will have to pay a fine.
Remember, in America, you are innocent until proven guilty. You have the right to go to Court and to have the Judge hear your explanation, and if you don't agree with the Judge's decision, you can appeal.