Do Not Encourage Them: Avoid asking for details or lending your ears to their tales, as this encourages their behavior.
Confront the Behavior: If possible, tell them directly that what they are doing is gossip and that it is wrong.
Set Boundaries: If they persist, separate yourself from the situation (Proverbs 20:19, 25:23).
Focus on Edification: Rather than being a "tale-bearer" (spreading rumors), seek to be a "praise-bearer" (speaking well of others).
Note: This does not mean ignoring sinful behavior that must be addressed, but rather avoiding malicious, unnecessary, and destructive gossip, say.