Hi,
Generally speaking, teachers are paid a salary which depends on a few things - the location of the school (e.g. London teachers get paid a substantial amount more than teachers in other areas of the country), experience, Teaching & Learning Responsibilities/TLR (e.g. Head of Department, Head of Year positions, etc), subject and potentially a few other things. See this link:
https://getintoteaching.education.gov.uk/teachers-salary-and-teaching-benefits/teachers-pay-scale-salaryTeachers are paid once a month, with their salary divided into 12 equal chunks paid as you'd typically expect to be paid in any other job. Dependent on the school, they may add to your salary if you volunteer to do things such as break duty, canteen supervision, detention supervision, etc. For example at my school teachers are paid £6 per additional duty that they do, so if a teacher were to volunteer to do break duty every day they'd be making £30 extra per week than those who don't volunteer.
As has been pointed out earlier, getting in early and staying behind is part of the job. Whilst you do have allocated free periods whereby you can mark and plan lessons, these may be taken up by last minute cover and other things which may leave you with no choice but to do your work outside school hours. It's usually the only time that you'll be able to have departmental meetings and time to prepare for the school day by means of photocopying, etc. Whilst you don't necessarily get paid for staying in school late, it will depend on your contracted hours. In some schools I know of teachers who are contracted from 8am-4.30pm. They may only be teaching from 9-3 but this means that they get paid to come in a little earlier and stay a little later - it really depends on the school. Some schools literally require you to be in for the usual school hours (8.30-ish to 3.30) but some teachers elect to stay later, but that's entirely down to you and the school. Some prefer to just take their workload home and do it there.
It should be noted though that the harder you work, the more likely you are to be promoted which will in turn mean that you gain a more substantial salary as time goes on. It should be noted that as a teacher you can expect to have 13 weeks holiday - which is a huge amount more than most jobs. Thus, you can probably afford to spend a bit more (potentially unpaid) time hanging around after school which is definitely beneficial. It gives you a chance to wind down and it's generally more laid back than the school day which is often hectic and busy.
You are paid in the holidays too.