Note that this answer generated a lot of debate. This is good, in my opinion, as I hope it prompted people to think about the issues of how we all should react to violence. However, it made the comments really argumentative which is not the purpose of this site. Thus, I have added some of the comments after the section. I believe that the section I added reflect the opinions of many. If you have a problem with this post, please add another answer of your own.
If you are at the stage of a physical confrontation, in my opinion, you have already failed as a martial artist*. You have missed dozens of clues, failed to run to safety, and in all likelihood helped precipitate a physical confrontation. Do you carry and know how to use a whistle for self-defence? If not, you should.
That said, put them down hard enough to be able to run towards safety. Remember that you may be asked to defend your actions in a court of law. Did you use "reasonable force"/"minimal force" to get out of trouble? This requires control and self-discipline.
As for training, all of your classes should be about using your might in a controlled way. This is what sparring is all about. Can you remain calm and controlled when someone really is going for you? Fight in a ring (or at a competition event) and find out.
No nonsense self-defense is a good site to read on the matter of self-defense in general.
Note that I am assuming that the question is aimed at civilian self defence and neither law enforcement and military self defence advise is sought. Those latter two are utterly different beasts that would require their own answers and those above advise would no longer be fully applicable.
Edit: Anecdotal evidence is never acceptable as proof for any argument whatsoever. It is a logical fallacy. Just because you know of someone that had something happen to them where they had to stand and fight, does NOT mean that it is good advice to do it in all cases.
Are there cases where you must fight? Sure: soldiers do it all the time. Their job is to kill the enemy. They even use martial arts for that -- look up the etymology of the word if that confuses you.
I can think of a thousand cases where without any fault of your own you must fight. I can think of a billion cases were you could have avoided it. But, in my not so humble opinion, any martial art teacher that says that you should stand up and fight in all or most cases is a dangerous cretin that will get his/her students killed.
(*): Yes, this is a general statement. Yes, it does not apply to 100% of cases -- soldiers or police for example will have to use up to lethal force to defend themselves and others. Yes, all martial artists, in my opinion should have enough common sense, learned ability and intelligence to avoid getting into trouble. Sun Tsu said that Hence to fight and conquer in all your battles is not supreme excellence; supreme excellence consists in breaking the enemy's resistance without fighting. Surely, that is what all martial artist aspire to. The rest is just excuses for having failed that goal. </flame war baiting></do not feed the troll>
These are additions from comments, with credit
GrandmasterB states that "In an ideal world, yes, the martial artist should be picking up on indicators and know how to avoid putting themselves into bad situations. But its not always up to the defender whether or not a physical attack occurs. It could be a home invasion, carjacking, or (as is more common) someone you know/are familiar with. Or you could be defending someone else. Short of living in a steel safe there's no a priori guarantee of a non-violent way out of all situations."
David H. Clements adds "I think there is a confusion of different types of confrontation that can occur and what you can realistically do to avoid them. There's a difference between a "monkey dance" (which is a mutual engagement), other social violence dynamics (sometimes mutual, sometimes avoidable but not trivially so, etc), and what happens with a predator who has specifically isolated you in a situation you aren't realistically always going to be able to avoid (e.g., in an apartment alone)."
Swift quoth "The point that I'm trying to make is that just because it's a violent situation doesn't mean you automatically have to resort to violence on your side, i.e. the mugging example, Id just give up the money. In the CCW example I said "deadly physical force would be warranted", we should all be aware of the legal ramifications of our actions with or without weapons. Nothing is ever black or white, every situation is different. The vibe I got from Sardathrion post was that we, as martial artists, should avoid violence whenever possible."
Finally, Rophuine gets irate "I'm not saying the sentiment isn't on the right track: most violent escalations involving a martial artist will involve a failure on the part of the martial artist. It's important to keep that in mind. But it's also important to be ready for violence when it is unavoidable, and that flexibility is the whole point of martial arts. To stick to the argument that it's always a failure of the martial artist is an insult to every martial artist who's stepped in once a situation has already turned violent and defused the situation."