Japanese educational system is - 6 years elementary school, 3 years junior high school, 3 years high school, 4 years college/university(or 2 years junior college). Elementary school and junior high school, total 9 years is the compulsory education but more than 90% continue to study at the high school. Then, around 60% study at college/university/junior college.
There are public schools and private schools but most children study at public schools till junior high school. Many teenagers choose to study at private schools in metropolitan areas, especially in Tokyo metropolitan area. Or in case they fail to exam to enter the public schools, they have to go to private schools.
Municipalities usually have more elementary schools than junior high schools. The ratio is usually 2:1 or 3:2, except in less populated areas which can be 1:1 - elementary school and junior high school are located in the same properties. In cities, pupils of two or more elementary schools will continue to study at one junior high school together.
Not like in US, pupils must commute on foot during public elementary schools - no school bus. On the other hand, most of the pupils of private schools must commute by trains or public buses.