When an acid reacts with metal, a salt and hydrogen are produced:
acid + metal → salt + hydrogen
The salt that is produced depends upon which acid and which metal react.
Sodium metal reacts with hydrochloric acid which produces hydrogen gas and sodium chloride.
2Na(s)+2HCl(aq)→2NaCl(aq)+H2(g)