The corrosion of silver, also known as tarnishing, is due to the reaction of silver with sulfur-containing compounds in the air, such as hydrogen sulfide ($H_2S$). This reaction results in the formation of a black coating of silver sulfide ($Ag_2S$) on the surface of the silver.