Not quite. Each specialty has its own training programmes, within which there are subspecialty programmes.
A rough guide for a medical school graduate going into a non-GP 'run-through' specialty and not doing anything else along the way would be:
2 years in the Foundation Training Programme. Satisfactory completion of this depends on attainment of competencies and workplace based assessments including being observed doing procedures, case presentations, being observed assessing and treating patients, etc.
Competitive entry to training.
6 (sometimes more) years in 'run-through' training, during which there are annual reviews of progression, lots of workplace based assessments, College exams.
For a graduate who wants to go into an 'un-coupled' specialty, there's competitive entry to training at the start and then at the stage of 'un-coupling' - so, for example, (using this as I've been helping a trainee with it), in psychiatry, there are 3 years of 'core' specialty training (during which there are exams etc), then trainees have to go through competitive application for 'higher' training in subspecialties, which can be 3 to 5 years long and again have lots of assessments.
In practice, most people take longer than that. Having a competitive application means having additional qualifications (like Masters degrees, early completion of mandatory exams, relevant diplomas), additional skills developed through fellowships or through gaining extra experience in specialty doctor posts or special interest sessions, research experience, etc. Many people choose or need to do College exams 'out of programme' (these need a lot of studying and practice, which is hard enough to fit in if you're just doing your standard work, let alone trying to fit in other life commitments). Maternity leave, sickness absence, etc can all extend training. A lot of people will also train part-time for some of the training programme, either for personal reasons or to do something else work-related alongside it to make themselves more competitive.