Acids can corrode many different kinds of metals or wear them away through chemical processes. Not all metals react with acids in the same way, however, and some metals are more vulnerable to corrosion than others. Some metals react violently with acids -- common examples being sodium and potassium -- while others, like gold, do not react with most acids.
Alkali and alkaline earth metals
Metals in the first group of the periodic table are classified as alkali metals, while those in the second are alkaline earth metals. Both groups react with water and react even more vigorously with acids. These reactions yield hydrogen gas. With calcium, magnesium and lithium, the reaction is fairly gentle, but metals farther down in the group react violently, producing enough heat to set the hydrogen gas on fire and cause an explosion.
The noble metals are at the other extreme: they are resistant to corrosion in moist air and do not react readily with dilute or weak acids. Gold, for example, does not even react with nitric acid, a strong oxidising agent, although it will dissolve in aqua regia, a solution of concentrated nitric and hydrochloric acid. Platinum, iridium, palladium and silver are all noble metals and have good resistance to corrosion by acids. Silver reacts readily with sulphur and sulphur compounds, however. These compounds give silver a tarnished appearance.
Iron is fairly reactive; in moist air. it oxidises to form rust, a mixture of iron oxides. Oxidising acids like nitric acid react with iron to form a passivating layer on the surface of the iron; this passivating layer protects the iron underneath from further attack by the acid, although the brittle oxides of the layer can flake off and leave the interior metal exposed. Non-oxidising acids like hydrochloric acid react with iron to form iron (II) salts -- salts in which the iron atom has lost two electrons. One example is FeCl2. If these salts are transferred to a basic solution, they react further to form iron (III) salts, in which the iron has lost three electrons.
Aluminium and zinc
Aluminium should in theory be even more reactive than iron; in practice, however, the surface of the aluminium is protected by a passivating layer of aluminum oxide, which acts like a thin blanket to shield the metal beneath. Acids that form a complex with aluminium ions can eat their way through the oxide coating, however, so concentrated hydrochloric acid can dissolve aluminium. Zinc is also very reactive and lacks the passivating layer found on aluminium, so it reduces hydrogen ions from acids like hydrochloric acid to form hydrogen gas. The reaction is much less violent than similar reactions for the alkali and alkaline earth metals. It is a common way of creating small amounts of hydrogen for use in a lab.