Acids react with most metals and, when they do, a salt is produced. But unlike the reaction between acids and bases, we do not get water. Instead we get hydrogen gas.
This is the general word equation for the reaction:
For example, magnesium reacts with hydrochloric acid to produce magnesium chloride:
magnesium + hydrochloric acid → magnesium chloride + hydrogen
Mg + 2HCl → MgCl2 + H2
It doesn't matter which metal or which acid is used, if there is a reaction we always get hydrogen gas as well as the salt. However, how quickly the reaction goes depends on the metal used and how high up in the reactivity series it is.
There is a simple laboratory test to see if a gas is hydrogen. A burning wooden splint goes pop if it is put into a test tube of hydrogen. This is because the flame ignites the hydrogen, which burns explosively to make a loud sound.