When a metal reacts with hydrochloric acid, it produces the metal chloride (salt) and further liberates hydrogen gas which is a colourless and odourless gas.
Equation of the reaction
M(s) + HCl(aq) --> MgCl(aq) + H2(g)
A burning splint test is carried out for the identification of gases in the laboratory. A characteristic property of Hydrogen gas is that it gives a distinctive 'squeaky pop' sound.
Hydrogen is easily ignited, as it is flammable over a wide range of concentrations in air.