This is a whole chapter in "How to win friends and influence people."
Someone says something wrong in passing? Ignore it, move on.
Someone says something you disagree with? Evaluate if the inevitable unresolved and probably heated argument that will happen when you make it an issue is worth the time, effort, and awkwardness for everyone else present.
Someone says something exceptionally disagreeable? Just fucking leave it be and disengage as soon as possible. The fight isn't worth the time.
Someone says something wrong in passing? Ignore it, move on.
Someone says something you disagree with? Evaluate if the inevitable unresolved and probably heated argument that will happen when you make it an issue is worth the time, effort, and awkwardness for everyone else present.
Someone says something exceptionally disagreeable? Just fucking leave it be and disengage as soon as possible. The fight isn't worth the time.