Threat of punishment or convincing them it's in their own best interest.
I have noticed a new series of anti-drink-driving adverts on the TV in the US. I couldn't find a youtube video but it basically shows traffic police who catch a drink-driver. In DC, I've seen signs around town saying something along the lines of: "Don't text/talk on the phone while driving. Who will catch you? DC police will." Both of these rely on people not behaving in some way because of the fear of being caught.
Compare this with efforts in the UK. Signs along stretches of road or at roundabouts tell you how many deaths there have been in the previous three years. And here is a selection of short adverts on the TV (pop them out if you can't see them) - warning: they are pretty hard-hitting:
A drink-driving one:
An phone whilst driving one:
A seat-belt one:
You can easily search for more for texting, speeding etc
The difference between the British and American approaches is pretty interesting. There is a different philosophy behind convincing people to obey rules. The British approach tries to convince people that it is in their own best interest to obey the rules, or, at least, that the rule is a good idea for society that should be obeyed regardless of punishment. The American efforts don't try to convince people that the rules are correct, but that they will be caught and punished if they don't obey them.
The UK has amongst the safest roads in the world. The World Health Organisation has a recent report on traffic accidents. I think there has been quite a lot of success in the UK. In America, I always see people chatting on their mobile phones, texting, etc...