The law provides certain privileges which render some evidence inadmissible and therefore, the Judge (or jury) cannot hear it or consider it in the case. One such privilege is the attorney-client privilege. This privilege protects communications between a party (the client) and his or her attorney.
Any communication (writing, email, verbal, etc.) you make to your attorney and any communication your attorney makes to you is considered protected by the privilege. Such communications are inadmissible in court.
However, as with all privileges, there are circumstances where the holder of the privilege can waive the privilege, causing normally inadmissible evidence to become admissible. This often happens inadvertently or by accident. With the attorney-client privilege, the privilege is waived if the communication is disclosed to a third party.
The moral of the story here is don’t discuss what you tell your attorney (or what your attorney tells you) with your friends or relatives. Those communications are confidential and inadmissible in court. However, if the other side were to find out you disclosed those communications to someone else, you may have to disclose them to the court to your detriment.