This is an irregular verb.
In contemporary Portuguese, haver is mostly used impersonally in the 3rd-person singular forms há (present), havia (imperfect), and houve (preterite) to mean there is/are/was/were, or with há + time, ago.
In European Portuguese, haver is widely used in both spoken and written language. Forms like há, houvesse, and haveria are common and natural, even in everyday speech (e.g., há muita gente, Queria que houvesse mais tempo, Haveria muitas vantagens).
In Brazilian Portuguese, ter is much more common in everyday speech. Forms like tem, tivesse, and teria are typically used instead of há, houvesse, and haveria (e.g., tem muita gente, Queria que tivesse mais tempo, Teria muitas vantagens).
Present:
Há um problema no sistema.
(There is a problem with the system.)
Cheguei há duas horas.
(I arrived two hours ago.)
Preterite:
Houve um acidente ontem.
(There was an accident yesterday.)
Imperfect:
Havia muitos alunos na sala de aula.
(There were many students in the classroom.)
Imperfect Subjunctive:
Queria que houvesse mais tempo.
(I wish there were more time.)
Conditional:
Haveria muitas vantagens nessa solução.
(There would be many advantages to that solution.)