For very young kids, either physically remove them or prevent the situation from arising. (I also give an explaination and a certain amount of telling off but accept it probably won't go in)
So for the examples you gave:
running in road-they would be holding my hands at all times on the road. I am very very strict on this. I would also use reins. Ditto messing about.
Removing seat belt in car-I got a special thing that stops the child being able to get to it. I have a feeling its now not recommended though? (its called a hug it). I also keep car journeys to a minimum during this stage.
For older kids, an explaination. If appropriate we might go through the possibilities for what could happen etc. This takes a while, certainly, but I have only had to do it once with each child (and sometimes less -the older one teaches the younger). Ultimately, if the behaviour continues, I do use consequences, so "if you do x, I will do y/y will happen".
So running in the road would translate into first talking about what could happen-a car not seeing them and hitting them, etc. If that yielded no results I would say that if they ran in the road I would not take them out unless it was somewhere I had to go, and I would actually stick to that for a day or so.
BUT I'd only use such a harsh sanction in something dangerous-I don't use it for my convenience.