Foil stamping is somewhat similar to letterpress and engraving, in that the colour is applied with pressure. Once the design is finalised, metal dies are created in the appropriate shape for each individual colour foil to be applied for a particular design.
The dies are heated and then stamped with enough pressure to seal a thin layer of foil, and each colour is applied individually through multiple runs of the press to create the final design.