Mediation is not a trial. Rather, a trained mediator will try to get the parties to resolve the case on their own. When it works, it's like magic, but not every case is susceptible to mediation. If your case can't be resolved by your lawyer, or by arbitration, or by mediation, the courts usually require you to attend a mandatory settlement conference held by a judge. The judge will explore the merits of your case and try to persuade you to settle.
Most cases do, in fact, resolve at or before the mandatory settlement conference.
The judge cannot make you settle your case, but most judges are highly persuasive in convincing parties of the wisdom of settling to avoid the uncertain results of litigation. But some cases actually do go to trial, and yours may be one of them. You can also waive your right to a jury trial and have the case heard and decided by a judge. It depends on who you ask. Jury trials are longer, more complicated, and considerably more expensive than court trials.