When two parties come to court, usually one person is successful and the other is not. The successful party may ask the judge to order that the other party pay "costs".
Costs are intended to compensate the winning party for their legal fees and other expenses for having to come to court. The Rules of Court sets out a schedule for calculating the amount of costs when someone has a lawyer. However, the amounts in the schedule are often lower than the actual lawyer's fees.
Even if the successful party does not have a lawyer, the court may order costs, if the person had out of pocket expenses, for example, lost wages or travel expenses.
In family law cases, the judge may find that there is "mixed success" – that is both parties were partially successful and partially unsuccessful. In that case, the judge may not order costs.
Costs can be ordered even if the parties never go to court. For example, in a Statement of Claim for Divorce, the Plaintiff may ask for costs. If the Defendant does not object, the divorce will be granted as a Desk Divorce (without a court hearing) and the Divorce Judgment may include a paragraph ordering the Defendant to pay the Plaintiff's costs. This would cover the cost of preparing the documents, filing fees and service costs.
If one party has made a formal offer to settle, and the other party does not accept it, and if the judge decides in favour of the first party in court, then the amount of costs can be increased.