It took me years to learn this and once I finally did, I realized I should have done it a long time ago. Forgiveness frees our hearts so we can heal. The other person does not have to know unless they ask for forgiveness. When we hold the anger and grudge against someone, we are giving them a free place in our heads.
Not forgiving can cause us many problems from health issues to anxiety, etc. But, when we forgive, we need to do it like God forgives us. He forgives and forgets. He remembers it no more once we ask Him to forgive us. So, when we forgive someone, we need to totally forgive and put it behind us so that we are not holding on to negative thoughts.
I find that life is a lot more peaceful when I forgive those that have wronged me and let it go. Even when people have hurt me deeply, once I forgave them, I felt peace and calmness. And I think it is also important for us to ask others to forgive us when we have hurt them or been ugly to them or spoke harshly. It is surprising because I have done that and had the person tell me they were sorry as well.