Recently I preached on the consequences of sin, from the story of David with Bathsheba (2 Samuel 11), and I stressed the importance of confession of sin for forgiveness. One person emailed to ask, "When you said in Church the first step is to confess your sins, who do I confess them too? I was a little confused!"
Here was my answer:
My apologies for not making this point clearer in my sermon. We confess our sins to the person against whom we have sinned. If it is a private sin, it should be confessed in private. If it is a public sin, it should be confessed in public. Since all sin is against God, we should begin by confessing our sins to God in prayer. Then we also need to confess a sin to the individual we offended, if it is possible to do so.
In the Bible, 1 John 1:9 says that if we confess our sins [to God] then He is faithful and just and will forgive our sins and purify us from all unrighteousness. So we go to God in prayer and honestly tell him our sins. By confessing our sins to God, we receive God's forgiveness, whether anybody else forgives us or not. By confessing sin and admitting that Jesus Christ is our Lord, we find forgiveness for our sins for eternal life (see Romans 10:9-10, 13).
David's prayer of confession in Psalm 51 is a great model of this.