Sorry for taking this off of Sharon's resp, but I'd also like to add
some more verses to that and perhaps answer the second Q.

Verses:
   1 Corinthians 6:9-10
   Colossians 3:5-10

As for knowing when, that's a bit tricky.  People normally have
consciences which warn them about it.  However, as in my case, a
conscience can be hardened by sin's deceitfulness (Hebrews 3:12:13) so
that the person has no idea (or doesn't care about it) that they are
sinning.  Of course, there are those sins which we do when we don't know
that they're sinful to begin with.  Those take searching and examining
of Scripture to find out that they are sinful and then repent and
change.  The best question to ask in every circumstance to judge sinful
possibilities is:  "Would Jesus wholeheartedly do this at this point in
time?"  I know, it sounds like a cop-out, but it truly is a stifling
question.

Joe Fisher