Acids and bases react vigorously with metals to form a salt and liberate hydrogen gas.
Example: Reaction between Zinc and Hydrochloric acid
Zn(s)+2HCl(aq)⟶ZnCl2(aq)+H2(g)
Example: Reaction between Zinc and Sodium hydroxide in presence of water
Zn(s)+2NaOH(aq)+2H2O(l)⟶Na2Zn(OH)4(aq)+H2(g)