Reactive metals, generally those above hydrogen in the reactivity series (like Magnesium, Zinc, etc.), react with dilute acids to displace hydrogen and produce hydrogen gas and a salt.