(a) When a metal is treated with an acid, it liberates hydrogen gas from the acid and combines with the remaining part of the acid to form a compound called a salt.
Chemical equation:
Zn(s) + 2HCl(aq) → ZnCl2(aq) + H2(g)
(b) Hydrogen gas is usually liberated when an acid reacts with an active metal.
For testing the presence of hydrogen gas, bring a burning candle near the test tube in which reaction has taken place. If the gas burns with a popping sound, the gas is hydrogen.