In mainland China, the year 1 to year 6, which pupils normally attend at age 6, are considered elementary or primary education. Primary education is compulsory.
Secondary level education is generally considered 中学. 中学 is the overall term for year 7 to year 12 education (normally, in certain times or regions it could be 1 year shorter or longer). And the first three years (year 7 to year 9) are called 初中 and the rest are called 高中. And 初中 is part of compulsory education as well. But 高中 is not.
The problem is that the usage of term "middle school" and "high school" are not quite consistent in all English speaking regions. For example "high school" in Australia includes the education from year 7 or 8 to year 12. And in the U.S, high school often means year 10 to year 12 and year 7 to year 9 are often called junior high or middle school. And in the UK, the definition varies by constituent country as well.
In mainland China, 初中 is often translated to middle school. It's in the official English names of many middle schools. 高中 is often translated to high school. If a school offers both levels of education, it's often called just a high school (e.g. Beijing No. 4 High School).
So all you need to know is that there are two tiers in the secondary education in China. The first one, normally three years are 初中, the second tier is 高中, and combined they are 中学. Regarding how to translate it, it really depends on your audiences.
There is another thing that should be noted. That is even though 中学 is often translated as "High School" which literally can be translated back to "高校" (since High=高, School=校). However this is totally wrong. 高校 is short for 高等学校 or 高等教育学校, which means higher education schools which often are the insinuations (universities) that provide tertiary education, not secondary education.