The Catechism of the Catholic Church (2264):
Love toward oneself remains a fundamental principle of morality. Therefore it is legitimate to insist on respect for one’s own right to life. Someone who defends his life is not guilty of murder even if he is forced to deal his aggressor a lethal blow:
If a man in self-defense uses more than necessary violence, it will be unlawful: whereas if he repels force with moderation, his defense will be lawful. . . . Nor is it necessary for salvation that a man omit the act of moderate self-defense to avoid killing the other man, since one is bound to take more care of one’s own life than of another’s (2264).
We must only use lethal force in self defense if it is absolutely necessary to defend our own life of life of another. Outside of absolute necessity, a person would be guilty of murder.