Metals react with acids to produce hydrogen gas. Acids contain hydrogen atoms. For example, in hydrochloric acid hydrogen is bonded to a chlorine atom. Therefore when metals react with acids they take the place of hydrogen in the acid and therefore form a salt. The displaced hydrogen is then released as a gas. This does not happen with all metals though. The metal has to be higher than hydrogen in the reactivity series for this to occur. The higher up a metal is in the reactivity series, the more likely this metal would form cations (ie release an electron) to participate in a reaction. Therefore if the metal is more willing than hydrogen to participate in a reaction, it would displace hydrogen from the acid. Metals like sodium, calcium and magnesium would easily release hydrogen when reacting with an acid. While silver, platinum and gold would not react with an acid and therefore, would not release hydrogen gas.