This type of chemical reaction is known as a single displacement reaction, where an element displaces another in a compound. The hydrogen in acids is displaced by the metals to produce hydrogen gas.
The two common acids are sulfuric acid (H2SO4) and hydrochloric acid (HCl). The most active metals are magnesium (Mg), zinc (Zn), iron (Fe) and lead (Pb). The most inactive metals are copper (Cu), silver (Ag) and gold (Au).