You cannot help what you hear in spite of your protestations, but you might just tell them you don’t want to hear it. Then if they keep on talking, try to redirect the conversation, or take leave if you can.
Gossip is a sin which must be confessed. If they know of your faith, simply ask them to honor and respect it. If not, it is an excellent opportunity to explain “detraction” and the potential harm it can cause. All of this is part of bearing our cross behind Christ.
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.