A mediator is a go-between, someone who helps two parties in dispute reach an agreement. A mediator is necessarily neutral, and cannot take sides. The mediator is sometimes referred to as neutral third party.
The mediator is not a judge. He cannot give legal advice. His goal is not to have a winner and a loser, but to have two winners. In a meeting where confidentiality is the rule, he helps the disputants reach an equitable settlement agreement.
As a follow up to my Reasons for Mediation Failure, I offer Four Reasons Why Mediations Don't Work and particularly this paragraph:
3. Frame of Mind - If you are attending mediation and if you know it won't work, then it won't! This is true for both the parties, counsel, advocates and the mediator. The parties in the mediation must go into the mediation knowing that they can come to an agreement and understand that they are not settling or failing by settling their dispute in the mediation. The counsel (or attorneys) must enable their clients to succeed in mediation by preparing them appropriately for the mediation session.