Secondary school (Gymnasium) is not mandatory. If you want to you can just not continue studying and start working, though, of course, your options are very limited.
You choose which one you want to enrol in, but they can impose limits. For example, if there's this really popular school which can take in 100 students for each grade but there are 1000 people applying for it, they raise the grade-bar. There's this point system they use.
The highest grade is worth 20, the next 15 and the next 10. They take 16 subjects and then multiplies it with the grades. If you have MVG (the highest) in 16 subjects, you get 320 (16*20). The schools can raise the grade limit to something like 275 to weed out people. I'm aiming to get 300 points, at least. The CFC-poster Love said he got 310 points last term, which is really good.