At a juvenile trial in Pennsylvania, what would take place is the judge would preside over the proceedings. The Commonwealth of Pennsylvania would be represented in most instances by the district attorney's office of the county in which the matter took place. An assistant district attorney would be in the courtroom. The defense attorney would be representing the juvenile defendant. There would be an opening statements from the Commonwealth and from the defense. Witnesses would be questioned. They could include police officers if they were involved in the case or other witnesses say if an incident took place at school.
Students could be called as witnesses, teachers could be called as witnesses, parents could be called as witnesses. Any appropriate witnesses would be called to testify in court. Those witnesses would be questioned. They would be examined by the Commonwealth. They would be cross-examined by the defense. Defense witnesses would be examined by the defense and then cross-examined by the Commonwealth. Then there would, say, be closing statements, and ultimately the judge would make a determination whether or not the juvenile offender should be adjudicated delinquent or not. In doing so, if they're not adjudicated delinquent or not found guilty, the cases or the charges would be dismissed.
The juvenile is free to go. If the juvenile is adjudicated delinquent, then the court would schedule a disposition hearing in most instances where similar to a sentencing hearing, but in juvenile court, it's called a disposition hearing, where the outcome, where the determination would be made as to what kind of services the juvenile would receive, or what kind of supervision. Having an experienced Pennsylvania juvenile defense attorney will help you best understand and navigate the juvenile justice system. They should be involved from as early as possible in the case.