The judge is in charge of the trial.
He makes sure that the trial is presented in a fair and a clear way. The judge settles any arguments between the barristers about what the law is.
If the defendant is found guilty the judge will get to say what the sentence should be.
The judge will also advise the jury on anything that they do not understand about the law.