The blackness of silver coin is due to the formation of silver sulphide in its surface due to its exposure to air. On boiling, the aluminium foil reacts with the layer of silver sulphide and displaces silver from silver sulphide to from aluminium sulphide and silver. This makes the coin shiny.
3𝐴𝑔2𝑆 + 2𝐴𝑙 → 6𝐴𝑔 + 𝐴𝑙2𝑆3