hay que vs tener que
Both express obligation. Hay que is impersonal — 'one has to'. Tener que is personal and names who must do it.
hay que
Impersonal necessity — a general rule for everyone, no subject. Only the 'hay' form is used in the present.
Hay que esperar.
We have to wait. / One has to wait.
No subject. A general or shared necessity.
No hay que preocuparse.
There's no need to worry.
No hay que = there's no need to. Not 'it's forbidden'.
Habrá que ver.
We'll have to see.
Future: habrá que. Past: había que.
tener que
Personal obligation — a specific person must do something.
Tengo que irme.
I have to go.
The subject is 'I'. Conjugates.
Tienes que probarlo.
You have to try it.
Personal recommendation.
Tuvimos que esperar dos horas.
We had to wait two hours.
Preterite tuvimos. Obligation completed in the past.
Tricky bit
'No tienes que ir' = you don't have to go (it's optional). 'No hay que ir' = one shouldn't go / there's no need. Spanish negation of obligation can mean 'don't have to' or 'must not' depending on the verb, so check the context.