Final answer:
Notify your manager about what you heard.
Step-by-step explanation:
If you hear a co-worker telling company secrets to a friend, it's important to take the appropriate action to protect the company's interests. The best course of action is to notify your manager about what you heard. This way, the manager can address the situation and take the necessary steps to prevent any further dissemination of confidential information. Telling the co-worker to stop talking may not be effective as they may continue sharing secrets without your knowledge, and joining the conversation would be inappropriate and could be seen as condoning the behavior. Ignoring the conversation would also not be advisable as it may allow the leaking of confidential information to continue.