the above reaction is a single replacement reaction.
In single replacement reaction, Zn reacts with HCl and displaces H⁺ from the compound HCl and takes the place of H⁺ and forms a new compound ZnCl₂. the displaced hydrogen is then released as hydrogen gas.
Single replacement reactions take place when the element that is displacing the other element is more reactive than the latter.
In this case, Zn is placed higher than H in the reactivity series therefore Zn is more reactive than H, therefore takes the place of hydrogen ion.