Ephesians 4:32 reads, “Be kind and compassionate to one another, forgiving each other, just as in Christ, God forgave you.”
This is a question which has troubled many Christians over the years, especially those desirous of being pleasing to their Heavenly Father. We pray for a forgiving disposition–a spirit that would prefer that the penitent transgressor would turn from his evil ways and repent of his sin. "If your enemy is hungry, feed him; if he is thirsty, give him something to drink. In doing this, you will heap burning coals on his head (open his eyes of understanding)." Romans 12:20 (NIV)
Jesus said, "If thy brother trespass against thee, rebuke him; and IF he repent, forgive him. And if he trespass against thee seven times in a day, and seven times in a day turn again to thee, saying, I repent, thou shalt forgive him." Luke 17:3,4 (KJV)
Jesus taught us to pray, "Forgive us our debts, as we also have forgiven (left, remitted and let go the debts, and given up resentment against) our debtors." Matthew 6:1(Amplified) So we should definitely forgive each other.
However, God does not forgive our sins until we acknowledge them and ask His forgiveness. 1 John 1:9, “If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness.” (KJV) Additionally, we need to pray for forgiveness through the blood of Jesus. “In him we have redemption through his blood, the forgiveness of our trespasses…” Ephesians 1:7 (ESV)
In summary: if we want forgiveness from God, we need to confess our sins and ask for forgiveness through the blood of Jesus. However, we, also, need to forgive each other.