$$Mg(s) + 2HCl(aq) → MgCl2(aq) + H2(g)$$
In this reaction, the burned magnesium strip reacts with hydrochloric acid to form magnesium chloride (MgCl2) and hydrogen gas (H2). The magnesium chloride dissolves in the solution, and the hydrogen gas is released as bubbles.
The reaction between burned magnesium and hydrochloric acid is a redox reaction, in which magnesium is oxidized and hydrogen is reduced. In other words, magnesium loses electrons (oxidation), while hydrogen ions gain electrons (reduction).
Overall, the effect of HCl on burned Mg strips is to cause a chemical reaction that produces magnesium chloride and hydrogen gas.