If you cannot resolve the disputed issues in any other way there will be a trial. Each side is allowed to call witnesses to testify. You may also testify. You will be sworn in and questioned on the stand. Your attorney will prepare you beforehand by going over her questions and the potential questions the other attorney may ask.
If you and your spouse have reached agreement on all of the issues before the trial, you will only have a brief hearing for the judge to approve the Settlement Agreement and grant the Divorce.