Often at the end of a mediation, the involved attorneys will draft, and the parties will sign a formal agreement.  Those agreements are legally binding.
Other times, usually for lack of time, a mediator will prepare a summary of the parties’ agreement.  Those summaries are usually not regarded as binding, in and of themselves, until the attorneys reduce them to a more full-bodied, comprehensive, agreement, and the parties sign.
The parties’ signed agreement is then filed with the court, which incorporates its terms into a final court order or divorce judgment.