“Don’t wrestle with pigs. You both get dirty and the pig likes it.”
Mark Twain (Samuel Clemens)
What this quote means is that you become what you allow yourself to get into to. This goes hand in hand with arguing or debating with fools. Win or lose, you bring yourself down to the fools level, while the fool, just being himself, gets satisfaction for adding a new member to the club.
Looking at it another way, the message is to be careful of the company you keep and who you interact with. Just like wrestling with pigs, you will get brought down to their level. If you want to help others, bring them into your environment, or take the pigs out of the muddy pen.