Self-defence assumes that the other person was the assailant, and that we had no choice but to respond to their attack. We are expected to do what is necessary to prevent injury to ourselves, but very little beyond this is justified. Other details are complex and with the circumstances.
One factor is the level of the threat perceived by the individual attacked. We respond to a situation as we perceive it, even if our perception latter turns out to be in error. If the assailant had a gun that later turned out to be unloaded we are still justified for responding to the threat of a gun. But even if we believe the attacker is a legitimate threat there is very rarely a justification for killing them.
Another factor is what is being defended or threatened. A thief trespassing or breaking into a house is different to an attacker who poses a threat to someone’s life. We can never justify murdering an intruder who was did not appear to be a potential murder themselves, though this circumstance would probably see the defendant’s murder charge reduced to the lesser charge of manslaughter. On the other hand, if we are defending someone else’s life we might have little choice but to respond forcefully to a threat.
It is difficult to make rational decisions in the heat of the moment when attacked, to weight up factors and decide what response is or is not justified. And it is perhaps unreasonable to expect every person being attacked to be familiar with the details of the law. Some martial arts training can be of benefit in at least some of these circumstances. Taekwondo and Karate would at least allow a victim of assault an increased means of avoiding injury, though even this is limited in a surprise attack where the assailant doesn’t play fair. But one advantage of martial art training is trained reflexes. After years of competitive practice an individual is inclined to automatically block a punch and avoid injury. Even if this doesn’t help in every circumstance, even if the assailant has a gun, it is still better than being an unskilled individual.
A court case looks at what the victim of the crime honestly believe was necessary at the time of the attack. If we can avoid injury, both to ourselves and the assailant, we will have an easier time justifying our actions.