As Monarch says 'Must' and 'Have to' are both used to express strong obligation. In the positive the difference is very subtle and many people use them both to express the same thing. But in general, 'must' is used when the obligation comes from personal circumstances and the speaker agrees with the obligation. 'I must go to bed earlier.'
'Have to' is used when the obligation comes from external circumstances or an external agent such as our jobs. 'I have to be at work by 9am. My boss is very strict about it.'
In British English we also use 'have got to' in the same way as 'have to'.
There is however a big difference in meaning in the negative.
'Don't have to' means it is not necessary. 'You don't have to come, if you don't want to.'
'Mustn't expresses strong obligation not to do something. 'You mustn't phone me at work. I'm not allowed personal phone calls.'
In your example 'have to' is better because the obligation comes from the school and being late for lessons is normally not permitted. so, you can say 'I mustn't be late for my classes.'