In the beginning of the case, the judge is neutral and serves to make sure the case is progressing in a timely fashion. The judge does not decide if the case should be dismissed. The judge does not know the details of the case, aside from what the attorneys tell the judge. The judge does not research the facts on the case.
If there is a dispute between the attorneys regarding the case (e.g. discovery), the judge will help settle the dispute. The judge will also keep the calendar for the case and make sure the parties are not unnecessarily delaying. Sometimes a judge will need to issue orders to move the case along.
Sometimes in a case the parties might disagree about a point in the law. When that happens they will file motions with the court and the judge will read the motions, hear oral argument, and decide the legal issue.
If the case settles with a plea agreement, the judge will review the agreement to make sure it is legally correct. The judge will also review the agreement with the defendant to make sure the defendant understands the agreement and voluntarily agrees to enter the agreement.
If the case goes to trial, the judge will maintain neutrality and oversee the selection of the jury. The judge will watch the trial along with the jury and swear in each witness that appears to testify in the case. If there is an objection to evidence presented in the trial, the judge will decide if it comes in or not.
If the defendant is found guilty, either by trial or plea, the judge will then decide the sentence. The judge has to follow guidelines and cannot sentence anyway he or she chooses. But sometimes the judge does have a lot of leeway in sentencing. The judge will listen to the prosecutor, the defense attorney, the defendant, and any family or victims that want to speak. Then the judge will announce the sentence.