He hit his father because his father hit his mother
Question

What is the Islamic ruling on one who defended his mother because his father was hurting her and hitting her, so he hit his father and yelled at him? If this happened in a moment of anger, when he was very upset, what must he do, especially since he bitterly regrets it and fears Allah, may He be glorified and exalted, and wishes that he did not do that?
Praise be to Allah.The rights of parents are immense, even if they are disbelievers. Allah, may He be exalted, says (of the meaning):
{But if they endeavor to make you associate with Me that of which you have no knowledge, do not obey them but accompany them in [this] world with appropriate kindness and follow the way of those who turn back to Me [in repentance]. Then to Me will be your return, and I will inform you about what you used to do} [Luqmaan 31:15].
Ibn Katheer (may Allah have mercy on him) said: Allah enjoins kindness towards parents, even if they associate partners with Him, in a way that is appropriate to them. And He, may He be exalted, says (interpretation of the meaning):
{And [recall] when We took the covenant from the Children of Israel, [enjoining upon them], “Do not worship except Allah; and to parents do good…”} [al-Baqarah 2:83].
And there are many verses that speak of this matter. In as-Saheehayn it is narrated that Ibn Mas‘ood (may Allah be pleased with him) said: I asked the Messenger of Allah (blessings and peace of Allah be upon him): Which deed is most beloved to Allah? He said: “Prayer offered on time.” I said: Then which? He said: “Honouring parents.” I said: Then which? He said: “Jihad in Allah’s cause.” Ibn Mas‘ood said: The Messenger of Allah (blessings and peace of Allah be upon him) told me of them, and if I had asked him for more, he would have told me more.
Shaykh as-Sa‘di (may Allah have mercy on him) said: As Allah enjoined us to fulfil His rights by keeping away from shirk, which means believing in Tawheed, He also enjoined us to fulfil parents’ rights, as He said: {And We have enjoined upon man [care] for his parents} [Luqmaan 31:14], that is, We have made it an obligation upon him, that We will ask him about, whether he fulfilled it and upheld it or not. We enjoined upon him to care for his parents, and We said to him: {Be grateful to Me}, by being a true slave to Me and fulfilling My rights, and not using My blessings to disobey Me, {and to your parents}, by showing kindness to them, and speaking kind and gentle words to them, treating them in a good way, being humble towards them, honouring them, respecting them, spending on their maintenance and avoiding mistreating them in any way, in word or deed." (Tafseer as-Sa‘di  1/648).
Thus it is known that what the questioner did to his father was a grievous wrong. What he should have done was control himself when he saw that which made him angry, such as his father hitting his mother. He should have remembered Allah, may He be exalted, and sought refuge with Allah from the accursed Shaytaan. He should have acted wisely in calming his father down and trying to prevent him from hitting his mother by asking her to go to another room, or to leave the house, and the like. For information on other means that may help to avoid getting angry quickly, please see the answer to question no. 45647 .
The way to repent:

Repenting sincerely
Regretting what has happened in the past
Resolving never to do that again in the future.

You should apologize to your father and ask him to forgive you, for what you did was a twofold sin: it was a sin against Allah and a sin against your father. As for the sin against Allah, you must repent sincerely from it. As for the sin against your father, you must apologize greatly to him and ask him to forgive you; you should show humility towards him and treat him kindly in every way you can, so that he will forgive you.
Even though this was a great evil and clearly wrong, we advise you not to let it make you despair of Allah’s mercy or forgiveness, if you repent sincerely.
Allah, may He be exalted, says (interpretation of the meaning):
{But indeed, I am the Perpetual Forgiver of whoever repents and believes and does righteousness and then continues in guidance} [Taa-Haa 20:82]
{Indeed, Allah does not forgive association with Him, but He forgives what is less than that for whom He wills} [an-Nisa’ 4:48]
{Say, O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, it is He who is the Forgiving, the Merciful} [az-Zumar 39:35].
Shaykh Ibn Baaz (may Allah have mercy on him) said: The scholars are unanimously agreed that this verse refers to those who repent. In it, Allah, may He be glorified, states that He will forgive them all their sins, if they are sincere in repenting to Him, by regretting what they have done, giving up sins, and resolving not to go back to them. This is what repentance is." (Majmoo‘ al-Fataawa  10/317).
For more information on parents’ rights, please see the answers to questions no. 30893 and 13783 .
And Allah knows best.