Secondary school, in the UK, lasts from the ages of 11/12 to 16 or 18, depending on the school.
The UK used to operate testing at the age of 11 (the 11-plus exam) which decided which type of school children would attend after primary school: either a secondary modern for non-pass children, or a grammar school or technical school for those that passed. The comprehensive system was brought in gradually over the early 80s to supposedly 'even things out', and the 11-plus was abolished.
There are also private schools, boarding schools and State-aided day schools at secondary level, which are mostly fee-paying, although there are scholarships for bright kids.
It's legal to leave school at 16 in the UK, after which students may go on to sixth form college, technical college or work.