Have to = Have got to
We use them to express necessity in the present or the near future.
However, 'have got to' is used especially in British English.
'I have to go to sleep now.' (= I've got to go to sleep now)
'Do you have to go?' (= Have you got to go?)
They can also be used to give advice or recommend something:
You have to try this recipe—it’s delicious.(= You’ve got to try this recipe—it’s delicious.)