The "system" at DDs' school is:
KS2 - two classes per year group. For literacy and maths, they have divided the whole year group into two classes by ability in each subject. So they each have three "classes" - their form group, their literacy class and their maths class. Literacy and maths classes are ability based - one lower and one higher. Within each, there are three or four ability groups, making up to eight ability groups in total.
I don't know how they cater for anyone that is off either end of the scale. DD1 is in the top group of the top for both subjects and seems sufficiently challenged. Differentiation includes things like making higher ability groups do similar tasks, but in a shorter timescale, or giving them less information about how to go about a problem, so they have to work it out for themselves.
For topic work and everything else, they are in their own classes and often put in mixed ability groups, not necessarily with people they normally mix with, to help with skills in team-building etc.
KS1 - Similar arrangement for maths. For literacy they are following the Read, Write, Inc scheme, which divides all the pupils who aren't yet at level 2 (I think) into small groups, strictly by ability. So there are groups which have children from four different year groups. Once they have "graduated" from RWI, they are in literacy groups within their own year group. I don't think they have enough children off the RWI scheme to have a wide range of ability yet!