Do you get questioned in front of a judge?

Idk how divorce actually works and I’m so scared to file. I can’t stand in a courtroom in front of the judge and my husband and be questioned. Can we just sign papers in separate rooms or does everyone have to stand in front of a judge??

I have no clue but I want to get out!!