Sexually arousing thoughts that a person may not deliberately entertain because they lead to the sinful desire to commit adultery, fornication, masturbation, or homosexuality.
An impure thought can be of a sexual nature, or just something that causes you to be aroused, they are sexually arousing thoughts, not necessarily "sexual" in themselves. But it's not a sin to have those thoughts until you recognize and give into them, because, especially nowadays, it's easy for those thoughts to pop into your mind, and that's really just the temptation to sin, and not the sin itself, it becomes a sin only when you willingly give into it.
A good way to flee from impure thoughts and get them out of your mind, is to say some prayers as soon as you see the temptation, the ones I always recommend are "precious blood of Jesus Christ, wash over me, protect me from the wickedness and snared of the devil." And then right after that "Jesus, Mary, Joseph, Saint Maria Goretti, Guardian Angel, help me."
And then immediately think of something else, something you enjoy very much that is not immoral, or if that doesn't seem to work (although it almost always does) then try to distract yourself some other way, such as calling someone on the phone or just finding someone in the house to talk to...but if it's something around you that is causing the impure thoughts, then you must remove yourself from that thing, and avoid it at all cost in the future, whether it's a site you go to, or a TV show, or some book or magazine, whatever it may be, you are obligated to avoid whatever leads you into mortal sin, which is what the church calls "occasions of sin".
Another good way to strengthen yourself against thoughts of impurity is to confess even your temptation to those thoughts in the confessional, and by doing that you will gain special graces to really knock the wind out of its sales, and you'll just become stronger against it.
The best things you can do with this sin is pray, go to confession, and go to communion, never neglect prayer, because it's by neglecting to pray immediately that we give in, and when you receive Jesus in the Eucharist, remember then especially to ask for a remedy for the sin of lust in your heart and mind, along with your other more dominant vices.