It means that whatever they told you, you should just forget it. If you mention it to someone else and it gets around, everyone will be pissed at you, and no one will support your action. Just shut up and forget the whole conversation. It didn't exist.
Friend #1 says something gossipy about friend #3, and says "but you didn't hear it from me." And you repeat the gossip to friend #2, friend #2 asks where you heard the gossip. Don't say you heard it from friend #1.