I really don't think anybody likes the feeling of getting pulled over, and that feeling after receiving a ticket. In my times dealing with police officers, I've learned one crucial rule: show respect. I'm serious. As easy as this sounds, many people seem to overlook this simple thought. Following this advice has saved me from two tickets already. While this might not continue to work for me, it could help you if you're dealing with your first ticket.
When you first see the officer's lights go off, try to locate to the nearest and SAFEST location. The cop will not only mind, but will also surely appreciate that you drove a bit further for the sake of his/ her safety. If the cop questions what took you so long for you to pull over, just simply mention you did it for their safety. They will be surprised by the consideration. Now that you are parked on the side, roll down your window, and put both hands on the steering wheel. Remember, don't reach for your papers or make any sudden movements, do everything when he asks for it. If it's at night, you can first turn on your car light inside, and then place your hands on the wheel in plain sight. These actions will show a sign of respect for the officer and will let him know you are no threat.
When the officer approaches you, address them as either sir/ma'am or officer. Don't show that you're mad or give any attitude that might show you're bitter from getting pulled over. Remember to try and not talk unless they speak first. If the officer asks you 'Do you know why I pulled you over?', always say no. If you say yes, it only gives them more of a reason to cite you a ticket. Avoid asking 'Why did you pull me over?' because you don't want to question their authority. What people don't know is that the police are capable of pulling you over for no reason at all.
Be honest and talk in a rationally. Officers seem to appreciate not only the honesty, but also the cooperation. If all else fails, and you know you're about to receive a ticket, there's nothing wrong with just asking to be let off with a warning. Be sure to let the officer know that you are aware of your mistake and be sincere with the apology.
I've even heard shedding a tear works. Hm, I'll let you guys know if that plays out for me next time.