to confess: to say out loud, before others, the wrong one has done
This is the New Testament word for owning up to sin in the open. It is never a private, silent regret; the whole force of the word is that the wrongdoing is spoken aloud, before God and before other people. At the Jordan River the crowds say their sins out loud as they are baptized, and in Ephesus new believers step forward and name the magic practices they had kept secret.
James turns the same word into a command for ongoing life together: believers are to keep confessing their sins to one another. Because it is mutual, this is people confessing to each other, not to an official. The point is that honesty about failure is meant to be shared and healing, not hidden.
What ties this to the word's other uses is the idea of standing up and declaring what is true. Here the truth is about oneself, and admitting it is itself an act of turning back to God.