At a Hauptschule, pupils attend classes from year five to year nine or ten. Year ten is voluntary in some of Germany’s states. Pupils leave the Hauptschule with the Hauptschulabschluss (lower secondary school-leaving certificate).
Pupils at a Realschule and other secondary schools take exams called the Mittlere Reife (intermediate school-leaving certificate) at the end of year 10. If they do well in these exams, they can then attend the gymnasiale Oberstufe (the upper level of Gymnasium) to take their Abitur, or they can do a vocational training course.
Your children will be able to take the Abitur at a grammar school (Gymnasium) and at many comprehensive schools (Gesamtschule). The Abitur is the higher education entrance qualification. Abitur exams are taken in either year 12 or 13, depending on the type of school and the federal state.
By the way: it is possible to attend university without the Abitur, and the numbers of people doing so is growing. Most universities offer advice and information on their websites for prospective students without a higher education entrance qualification.