When metals react with acids, Hydrogen gas and metal salt are produced.
2 Na + 2 H Cl ==> 2 Na Cl + H₂
Similarly other metals also produce the salt and hydrogen.
When metals react with bases, hydrogen gas is produced. With some metals and weak bases, nothing may happen.
2 Na OH + Zn ==> H₂ + Na₂ (Zn O₂) (sodium zincate)
Zn + 2 H₂ O + Na OH ====> Na₂ (Zn (OH)₄) + H₂