Legal process question

A Legal process question. If one party has a lawyer and the other party represents themselves, is it legal for the party who is representing themselves to contact the judge in person or via phone to ask questions/advice regarding the case without the other parties attorney being present?

No, the judge will not speak to either party ex parte (outside the presence of the other party) and a judge cannot answer questions or give legal advice to either side.

What if the judge does speak with the party who is representing themselves without the other attorney for the other party being present? What happens?

Ex parte communication is not allowed period. The judge could be removed from the case if improper ex parte communication occurs.