In Germany there originally was what's called a "dreigliedriges Schulsystem" or "three-parted school system". The first four years of Grundschule or "elementary school" are obligatory for everybody. After that, a child can basically go one of three ways:
The Hauptschule was originally meant to give the bulk of the population a basic education (a "grundlegende allgemeine Bildung"). Hence the name that literally translates as "main school". The Hauptschule encompasses grades 5 to 9 and focuses more on practice than theory. After finishing the Hauptschule, a young person was expected to start a vocational training.
The Realschule is some kind of middle ground. It focuses larger on theory than the Hauptschule, but not as much as the Gymnasium. It encompasses grades 5 to 10. After that, a young person was also expected to start a vocational training.
The Gymnasium is the third part of the "dreigliedriges Schulsystem". It encompasses grades 5 to 13 (or 5 to 12) and focuses relatively heavily on theory. At the end of the Gymnasium, there's a final examination called "Abitur". If you pass that, you have the "Hochschulreife", which means you can study at an university.
So, the original idea was something like, the soon-to-be brick layer visits the Hauptschule, the soon-to-be office clerk visits the Realschule and the soon-to-be academic visits the Gymnasium.
But of course such a strict division is far from adequate. Therefore, a whole lot of experiments and reforms have taken place. Because of this, the situation is way more convoluted nowadays.
There a things like the Gesamtschule, which combines the three forms explained above, so it's easier for students to "ascend" or "descend" without changing schools. There is (or was) the experiment to prolong the Grundschule to six years. There was the Förderstufe, which was a bit like a Gesamtschule for grades 5 and 6 only. There is "G8", which means shortening the Gymnasium to 8 years (grades 5 to 12). The idea was to get young people into the work force at a younger age, after they've visited the Gymnasium plus the university. But that mostly crashed and burned, so it's rolled back at many places.
In Germany, the educational system is in the responsibilty of the states (the Bundesländer). So there are a lot of variations, depending of which region we're talking about. In some cases, the variations go down to the municipal level. For example, there may be a Gymnasium that offers G8 (see above), one that offers G9 (the "original" grades 5 to 13) and one that offers both in the same city.
Long story short, how to translate "high school"? As I tried to explain, it really depends. But the term "high school" is relatively well known in Germany, so I'd at least consider to just leave it as is. This might especially be a good solution if you're talking about an educational system that actually has a "high school", like the American or Japanese systems.