He that reproveth a scorner getteth to himself shame: and he that rebuketh a wicked man getteth himself a blot. Reprove not a scorner, lest he hate thee: rebuke a wise man, and he will love thee (Proverbs 9:7-8). How should we understand these words? Are we not to reprove the scorner? Or the wicked man?
Often people take things that are said in the book of Proverbs as if they were immutable promises of God. For example, the proverb Train up a child in the way he should go: and when he is old, he will not depart from it (Proverbs 22:6) is often cited as it was guaranteed that if you raise your children right that they would at least eventually come to a point at which they would live according to the way that they were raised. However, a proverb is a word of wisdom that is usually going to prove to be true. This does not mean that there are no exceptions. There have been righteous people who raised their children right, but nevertheless had a child who died in rebellion against God. That does not make this proverb untrue... because generally it is true. Experience shows this to be the case. But experience also shows that there are some exceptions. Children retain free will, and despite the best Christian parenting, there are some children that rebel against their upbringing, and never repent.
In this case, it is generally true that rebuking a scorner is not going to go well, because such a person is not inclined to listen to any rebuke, and generally will only heap more scorn on the person doing the rebuking, But this proverb is not a commandment. There are cases in which rebuking a scorner might be in order. But one should obviously be very cautious about it, because it is generally not a good idea.
If you had a child who was a scoffer, as a parent, it would be your duty to rebuke him. Also, there may be some opportunities to say something to a scornful person that, at that particular moment, might actually be received well. If you have such a person in your life, you should pray that God would change their heart, and provide such an opportunity, and pray that God will give you the wisdom to know what to say, and when to say it.
One other aspect of this proverb is that it is teaching us to accept correction. All of us at some point in our lives have been wicked, and inclined to scorn correction. But if we have any wisdom we should love those who justly rebuke us. And even when we receive what we think to be an unjust rebuke, we should consider what we are told, and seriously question whether there is in fact some justice to it. Often our enemies will tell us things about ourselves that our friends will not. They may even do it with malicious intentions, but a wise man can even learn from his enemies.