Most of my answers are the same. There are two ways that grades are split up depending on current fad and how you need to juggle things to fit kids to schools. Grades K-4 in elementary, 5-8 jr high, 9-12 high school; or K-6 elementary, 7-9 middle school, 10-12 high school. So high school can had either three or four years in it.

As others said larger schools you have enough electives that many classes are mixed in years. Some classes like English each year has to take so there is one per year. Some like math generally per year but splits into advanced or practical so some mixing. Some you can take any year but seniors have fewer required classes so more electives.

Multiple elementary schools feed into each high school but as boundaries get redrawn from growth it is possible to go to elementary school with someone and end up in different high schools if you live somewhere where there multiple ones.

I went to high school early 70s in Maryland but mostly the same by the time our daughter went.