For if you forgive men their trespasses who trespass against you, your Heavenly Father will also forgive you. But if you forgive not men their trespasses, neither will your Heavenly Father forgive you your trespasses. (Matt. 6:14-15)
When it comes to forgiving someone, what exactly does it mean to forgive? At a minimum I believe it means choosing to not revile or seek vengeance. Yet we want more than that from God and God wants more than that from us. Therefore, I believe full forgiveness is the peace we receive when our hearts are set free of the emotional resentment that would otherwise lead us to withhold peace and love for our fellow man.
Why is the instruction to forgive taught in association with the instruction to pray? To me it is because forgiving is not always easy but sincere prayer makes it possible.
Do you have an enemy? Someone who has smitten or trespassed against you? Someone who you need to forgive but have not yet been able to? Prayer is the answer. Pleading with God for the eternal welfare of the person who has harmed you while sincerely asking God to take your anger, natural resentment and disappointment from your heart. Ask him to take it and give you peace and love towards them instead.
Even if it is delayed until the resurrection, Justice will always be met in full upon all those who do not repent and obtain mercy through Christ. Whether it is in life or death or in the resurrection justice will in the end always be satisfied.
Therefore, forgive that you may be forgiven and when you find that difficult to do, turn to prayer for the power to do so.