Germany has a schooling system that is overly complicated and depends on both intelligence and social standing. It is also not fair to everyone but very fair to some. The following depends on the particular state. For example, Grundschule in Berlin goes all the way to grade 6. This style of system is not unique to Germany. Other European countries have roughly the same style.
(Note: Schule translates to "school". Words with schule in them are a type of school.)
Students in Germany start Grundschule when they are about 6 years old. They generally attend the primary school for years 1 through to 4 (depending on the state), after which their grades for these first years of their schooling life, as well as the decisions of their parents, decide which high school they attend. There are four types of high schools and this is where it gets rather complicated. The schools teach the students according to their ability, ranging from Hauptschule, for the more practical and less academically minded people (read, less smart), to the Gymnasium, which is a school for students of an academic mind and/or the rich people.
This all starts at a very young age which means that a slow developer, or a child that has difficulty concentrating when they are that young will be placed is a school that is below their ability. A smart child may have poor parents who cannot afford a higher school and so be placed in a school below their ability. At the same time, a student who is academically not able to attend a Gymnasium could have parents who are well off, and so go there anyway.
Students who attend the Hauptschule stay there until grade 10, as students in Germany must have at least 10 years education by law. From this school students are able to gain an apprenticeship in manual trade or engage in part time studies at a Berufsschule. A Hauptschule and a Realschule teach the same subjects, but the Hauptschule teaches them at a slower pace to accommodate for the less academic students. A Gesamtschule is yet another version of high school which pretty much the two lower schools together to give a boarder range of abilities at a school. This has only started happening recently in Germany and this sorts of schools is not widespread.
One attends a Realschule to grade 10, after which you'll find yourself open to mid-level jobs in business, or jobs such as nursing. There is emphasis more on maths and language than on practical studies but even so it is easier than a Gymnasium. With good grades a student at this school can get into a Gymnasium, but this practically never happens.
The Gymnasium lasts the longest of the three main types of high school, as a student ends it in either year 12 or 13 depending on the state. It is a very demanding type of school as generally between 32 and 40 hours of school work and homework are required of the students. The subjects are generally classical and modern language and sciences. Philosophy is also a common subject. The final exam, called an Abitur, is needed to enter university.
Needless to say the students at the lower levels of schooling are expected to be unruly, impolite and generally the runts of the litter. This isn't always the case. I attended a Gymnasium in my time in Germany and for two weeks I experienced a lifestyle that you would not expect at a school of intelligent teenagers. Smoking was common, I heard plenty of stories of students coming to school stoned, drinking was a given and there was only a small group of 'nerds', or people who love themselves enough to not want to kill themselves by age 25. While there will be stereotypes, remember that teenagers don't like stereotypes and will do their best to fight them.
http://www.howtogermany.com/pages/germanschools.html
http://www.justlanded.com/deutsch/Deutschland/Tools/Landesfuehrer/Bildun/Das-deutsch-Schulsystem
http://www.mckinnonsc.vic.edu.au/la/lote/german/links/topics/schulstruktur.htm
http://library.thinkquest.org/26576/schoolpage.htm
NYH