The Quran says that the reward of an evil deed is an evil like it, but whoever pardons and makes amends, his reward is with Allah, and also that whoever is patient and forgives, that is among the matters of resolve. It does not remove the right to defend oneself: it also says that those who defend themselves after being wronged are not to be blamed. Forgiveness is therefore a choice, not an obligation to be silent.
A powerful example comes from the story of the slander against Aisha. Mistah, a poor relative whom Abu Bakr supported, joined those who spread the lie, and Abu Bakr swore to stop his support. Then Allah revealed a verse asking, 'Do you not love that Allah should forgive you?' and Abu Bakr answered, 'Yes, by Allah, I love that Allah should forgive me,' and restored the support to Mistah. The Prophet ﷺ also said that charity never decreases wealth, and that Allah increases in honour the servant who forgives.
Practically: forgiving does not mean trusting again, staying near an abuser, or dropping a legal claim; it means letting go of hatred and the wish for revenge. Some find it helps to make dua for the person, to remember their own need for Allah's forgiveness, and to take time, as deep hurt does not heal on command. If you have wronged someone, the Prophet ﷺ taught that you should seek their forgiveness now, before the day when there will be no coin to settle it.