If something can be solved without violence, then do it that way. Sometimes, however, violence is necessary, or it is too risky to take the chance of non-violence not working. In the case above, you would fight to stop the violence, instead of letting it go on. Sounds paradoxical, but sometimes things have to flare up before they can stop altogether. But if the guy threw a punch and has already stopped, there is no need to fight or get revenge, just call the police and escape. Even if he gets away, that's better than getting some kind of revenge in my opinion.
If there's no need to fight, and I mean for a really important need like preserving your or another's health, then it is better, more moral, and more honourable to run away. A lot of people don't get that and risk themselves over insults. Someone who insults you is not worth your time anymore. Proving yourself to an idiot is idiotic behaviour. It takes more courage to be called a coward and preserve peace than to become enraged and fight needlessly.