When Yom Tob falls on Friday, one must set aside before Yom Tob an Erub Tabshilin, which allows preparing on Friday for Shabbat. Generally speaking, Halacha forbids preparing on one day of Yom Tob for another, or on Yom Tob for Shabbat. However, the Erub Tabshilin allows a person to make preparations on Yom Tob – such as cooking and baking – for the Shabbat that follows.
The Erub Tabshilin entails setting aside one cooked food item and one baked food item. Customarily, a hard boiled egg and a piece of bread are used for this purpose.
Hacham Ben Sion Abba Shaul (Israel, 1923-1998), in his work Or Le’sion (vol. 3), notes the Shulhan Aruch’s ruling that it suffices to set aside only a cooked item as the Erub Tabshilin. Strictly speaking, then, one needs to prepare only an egg, and it is not necessary to set aside bread, as well. Nevertheless, it is customary to set aside both an egg and a piece of bread, and this is the practice one should follow.
Hacham Ben Sion further notes that this does not apply to the converse case. If a person set aside only a baked food, but not a cooked food, then he may only bake on Yom Tob for Shabbat, but not cook. A baked food item set aside as an Erub does not suffice to permit both baking and cooking on Yom Tob for Shabbat, whereas a cooked item designated for the Erub allows both kinds of preparation. It thus emerges that the cooked food is the more important of the two foods set aside as the Erub Tabshilin.
Hacham Ben Sion writes that it is proper, though not obligatory, to boil the egg specifically for the purpose of the Erub Tabshilin. It is therefore preferable to boil an egg especially for the Erub Tabshilin, rather than taking from the refrigerator an egg that had been boiled several days earlier. Likewise, it is preferable to use bread that was baked on Ereb Yom Tob, and not earlier. One should, if possible, go to the bakery on Ereb Yom Tob itself to buy bread that had been baked that day, for use as the Erub Tabshilin. This is preferable to taking out bread from the freezer for the Erub.
It is proper, whenever possible, to "recycle" Misvot, meaning, to utilize objects that had been used for one Misva, for another Misva. Therefore, it is customary to partake of the Erub Tabshilin as part of the Shabbat meals. Actually, one may eat the Erub Tabshilin even before Shabbat, once he completes all the preparations he must make for Shabbat. In any event, many people have the custom to place the egg in the "Hamin" ("cholent") prepared for Shabbat, and to eat the bread with one of the Shabbat meals. Others have the practice of setting aside three loaves of bread for the Erub Tabshilin, and eat one loaf with each meal.
These are all laudable practices to follow, though they are not obligatory.
Summary: When Yom Tob falls on Friday, one must prepare an Erub Tabshilin on Thursday, to allow preparing on Friday for Shabbat. The Erub Tabshilin consists of one cooked food – customarily a hard boiled egg – and a baked food – customarily a piece of bread. Ideally, one should boil the egg specifically for the purpose of the Erub Tabshilin, and use bread that had been baked on Ereb Yom Tob. It is customary to eat the Erub Tabshilin as part of one or several of the Shabbat meals.