The modal expression to have + Infinitive is used in three tense forms: the Present Indefinite, the Past Indefinite, and the Future Indefinite.

I have to get up at six every day.

When water was rushing through the tents and everybody had to sleep in wet blankets, it was treated as a joke. (Prichard)

I shall have to take the pupils into the hills, as usual, and see them settled there. (Voynich)

The negative and interrogative forms of this modal expression are formed with the help of the auxiliary do.

 Did you have to walk all the way home? I did not have to walk, I took a tram.

Only the Indefinite Infinitive Active and Passive can be used in this modal expression.

I had imagined we should have to hold a large house-party for the occasion. (Du Maurier)

I wouldn’t look through the letters — disappointment had to be postponed, hope kept alive as long as possible. (Greene)

 To have + Infinitive expresses an obligation or necessity arising out of circumstances. Its meaning is close to that of to be obliged.  

Bing knew that if Willoughby demanded it, he had to give the report. (Heym)

And if my father was fighting drunk sometimes he wouldn’t let us into the house so that we had to stay out all night. (Walsh)

Though both the modal expressions to be + Infinitive and to have + Infinitive express a shade of obligation or necessity, there is, a great difference in their meaning.

Compare: As I was to be there at 5 sharp (part of an arrangement), I had to take a taxi (a necessity arising out of this arrangement).

In colloquial English and especially in American English have/got + Infinitive is often used in the same meaning as have + Infinitive.

This modal expression is used in the Present Indefinite tense only.

Okay, we’ll beat ‘em to it. Dick, we’ve got to keep awake, we’ve got to watch things and be ready. (Lindsay)

 The negative and interrogative forms are formed without any auxiliary.

Have you got to do all this work yourself? No, I have not got to work so much.

There is a tendency in Modern English to use got + Infinitive in the same meaning.

You can smile away till you split your cheeks, but you still got to do a day’s work to earn a day’s wages, and apples don’t grow on monkey-trees. (Lindsay)