Technically, teachers aren't paid for school holidays. Of course, they're entitled to statutory holiday pay for 5.7 weeks per year, just like every worker in UK. So technically, there's about 6 weeks unpaid 'holidays'
Except the teachers contract is not that straight forward. They're not paid for days worked. They're paid for 2 elements - directed and undirected time. Directed time is 1265 hours per year over 195 days where the headteacher can direct a teacher to work. So that will include actually being in a classroom. Or attending a parents evening. Or doing a break duty. Basically when the 'head' tells a teacher to be somewhere.
If you divide 1265 by 260 days, incidentally, which is the number of working days another worker with statutory holiday entitlement works each year, it's almost 5 hours per day. Only teachers do them over 195 days so that's about 6.5 hours per day.
Teachers also have to work 'undirected time' which is limitless, and is any task which the teacher MUST do to fulfil their professional duties, but the head can't tell them when or where to do them. Like marking work, phoning a parent, having a meeting with a child's social worker, planning lessons, making resources, putting up display work, organising a trip, going in on results day, running revision sessions, re-writing schemes of work, supervising detentions, running an extra curricular club, writing reports. The head can't tell a teacher where to mark the books, or when, but it does have to be done, I used to do it after putting my kids to bed.
I'd say on average, there's about 4/5 hours of undirected tasks each day. Lots of teachers do more, and I'm sure there's plenty of anecdotes of "family members" who are teachers that do much less.
So a working day for a teacher is approx 10/11 hours average, I'd say. There's been quite a bit of research into working hours if you're interested.
So I'd view the situation with teachers salaries more like where you're consolidating full time hours into less days. Like doing your full time job in 4 days a week.
But teachers only get statutory holiday pay and do not get paid for the other 6 weeks when schools are shut*.
*they're not shut for 6 weeks - they're open for transition weeks, residential trips, revision conferences, results days, tidying the classroom at end of year, setting up a classroom at start of year, moving classrooms etc