- must + inf. (internal obligation)
I must write to thank my grandmother for the money she sent me.
- have to + inf. (external obligation: strong)
All students have to be at school by 8.00.
- need to + inf. (external obligation: mild; fulfilling it will benefit the speaker)
I need to finish my work by Saturday because I want to go out on Sunday.
- don't have to/needn't/don't need to + inf. (lack of obligation)
You have to dress smartly for the wedding but you don't have to wear a hat.