Yes, but the degree of confidentiality varies from state to state. If you are involved in a lawsuit, offers you may make to settle the case in mediation are not admissible in court, under general principles of evidence law. Other things that are said in mediation may not be protected.
A lawyer can draw up a mediation agreement which, when signed by both sides, prohibits disclosure of what was said in the mediation. Some mediators require the parties to sign a confidentiality agreement before they begin the mediation. Under California law, from the time you contact a mediator to ask about mediation until the mediation is over, everything said is confidential. That means that nothing written specifically for the mediation, or said during the mediation, is subject to discovery (being revealed) in any non-criminal proceeding. Furthermore, the mediator cannot be called to testify about what went on in the mediation in any later non-criminal proceeding. This means you can have complete confidence that what you tell the mediator in private will not be revealed.