Most divorcing couples do not want to end up in court. An actual trial before a judge is truly the last resort for couples who are so entrenched in their positions that compromise is impossible. There may also be a desire to prove that the other spouse is the "bad guy" in the drama.
In a trial each spouse's attorney argues their client's position on the disputed issues. Witnesses, including family members or friends, may be called and experts may be brought in by each side to give opinions on child custody arrangements or to value property.