This is the 3044th most frequent Spanish word.
haber
"To have" (as an auxiliary verb) or "there is/there are."
Here, 'hay' is an impersonal form of 'haber' used to indicate existence or presence of something.
Hay un libro sobre la mesa.
There is a book on the table.
In this sentence, 'he' is the first-person singular conjugation of 'haber' used as an auxiliary verb to form the present perfect tense.
He estudiado mucho para el examen.
I have studied a lot for the exam.
Here, 'haber' is used in the infinitive form to express the necessity of the existence of something.