It depends on which school you like. In case of high schools, if you choose a vocational high school (which teaches a specific craft or a group of crafts), as opposed to a gymnasium (a school that prepares you for further university studies), it also depends on your intended future profession.
> Presumably there are limits on how many places are at each school
That's what standardized entrance exams sort out.
> and you need some way to make sure that a child doesn't wind up with the only place left for them being on the other side of a city - so you'd have some degree of locality.
We have good public transport that was free for schoolchildren (and for high school students was very affordable), so this wasn't a problem for me even if my school was on the other side of town.