Answer not a fool according to his folly, lest thou also be like unto him.
The verse above, is saying if you answer a silly question from a person who's up to no good, you are just as silly as the person who asked the question.
This is plainly understandable. However, when we read a little further, the preceding verse gives another take.
(Proverbs 26:5) Answer a fool according to his foolishness, that he not be wise in his own eyes.
This is not a contradiction with verse four which urges us to answer not a fool, in comparison with verse five; which state, answer a fool according to his foolishness.
In essence, both verses are consistent with their instructions for the believer toward the fool and their foolish question. The idea of both verses being consistent is that, not all things spoken to us by a fool need be responded to. However, let us be wise and allow not the fool to get away with his or her foolishness less they think they are wise.
To sum it up, we have ears to hear, eyes to see, but with the mouth we have a single tongue. What goes out of the mouth, cannot be easily returned. Let us observe more, by what we see. Let us listen more, by what we hear, but speak only when it is of importance.