yes based on your test scores at the end of primary school and advice from teacher, kids apply to a certain type of school, broadly there are 3 levels, lowest level is attended by about 70% of kids, average level by about 25%, and highest level by 3-5%.
within each level there are usually multiple school in every city to choose from which have small differences in which optional subjects they teach, available facilities
its quite rare for a school to refuse an application, even if a kid doesnt have the best test scores, but the primary school teacher says they can manage, they usually accept them.
if your classes are already completely seperate from the dumb kids then i struggle to see why you are even in the same building as them. to perpetuate american high school bullying stereotypes in hollywood movies?