Depends on the pain and the cause. I've never had a significant injury in my life, or at least, anything that required me to go to the hospital/doctor.
If it's minor, I'll usually say "God damn it" or "son of a *****" and move on. If it's minor, but the pain last longer (you know, like when you stub your toe really good or hit your funny bone) I either freeze until the pain has subsided or if someone is talking to me, I tend to snap at them.
If I expect there to be pain or the pain is significant and long lasting and I'm scared at the same time, I sing. Well, more like a whimper/humming thing. I had to have some dental work done recently, and I will admit, I am a total coward. So, I was terrified about having the shots injected, and when she did inject them, I would whimper at first or squeal and then it would turn into this weird song. If the pain got more intense, the pitch would spike. She thought it was rather funny. It's also happened when I have pains that I don't know the cause of. Last summer, all of a sudden my ribs starting hurting. It felt like they were being compressed and it hurt, but I wasn't doing anything at the time nor had a done anything that would cause my ribs to hurt, so the singing/whimpering thing started up again. /shrug.