The Lord commands us not to judge or condemn others. However, we should recognize sins and report them to the proper authorities so sinners are arrested, that is, stopped. Then we should leave the judging and sentencing up to God.
For example, if you know a person is committing the sin of fornication, you should love the sinner enough to talk to them about repenting of it (see Ez 3:17ff; 33:7ff). If this doesn't help free the person, you should talk to anyone with authority over the person, such as a parent or pastor. Hopefully, this will arrest the person from further sinful, self-destructive acts. Then we should leave it in God's hands. He alone is the Judge and the One with the authority to sentence unrepentant sinners.
We are called to warn, intercede for, teach, prophesy to, and serve sinners. Our jobs are to remove the specks from others' eyes — to call them to repent after we let others help us to repent (Lk 6:42). We are ministers of reconciliation (2 Cor 5:18). If we by God's grace do our jobs properly, the Lord won't have much condemning to do; then He will judge us and other sinners to be ready for eternal happiness with Him.
Not judging or condemning does not mean doing nothing, being passive, or being permissive. Rather, we must bring back those straying from the Truth (Jas 5:19-20). Don't judge people; you have many other things to do.