When Yom Tov is on Friday, it should be permissible to prepare for the upcoming Shabbat, since Shabbat has greater sanctity than the festivals. However, to preserve the honor of the festivals, the Sages limited this permission and made it conditional upon setting aside Shabbat food before the festival. This should be something baked (usually a piece of bread or matza) and something cooked (commonly a hardboiled egg). It is referred to as an eruv tavshilin, which literally means a merging of foods, as the festival and Shabbat foods are merged through it. Just as cooking on a festival for the festival is permitted, having an eruv allows cooking on a festival for Shabbat as well.
This is the procedure for setting aside an eruv tavshilin. One takes the two items of food and recites the following blessing: “Blessed are You, Lord our God, King of the universe, Who has sanctified us with His mitzvot and commanded us concerning the mitzva of eruv.” Afterwards, the following is recited: “With this eruv it shall be permitted for us to bake, cook, light a flame, and do everything necessary on the festival for the sake of Shabbat, for us and for all Jews living in this city.” Once Shabbat begins, the eruv has accomplished its purpose, and may be eaten.
When Yom Tov begins on Saturday night, one must be careful not to prepare anything for the festival on Shabbat. Even setting the table on Shabbat for later is forbidden, as Shabbat is holier than the festivals.