The prohibition of Hatmanah forbids “insulating” food before Shabat in a manner that generates heat. It was customary in ancient times to keep pots warm by wrapping fabrics or garments around them. If the material does not only preserve the pot’s heat, but actually generates additional heat, then it is forbidden to insulate the pot before Shabat in preparation for the Shabat meal. The Shulchan Aruch states that even if the material used to wrap the pot does not generate heat, Hatmanah will still be forbidden if the pot is placed on a fire.
In light of this halachah, we might question the practice that many people have of wrapping food (such as Challah, Kugel) in tin foil and placing it on the blech over the stove before Shabat. Although tin foil does not add heat, this should seemingly be forbidden since the food is on the fire. Indeed, Rav Moshe Feinstein (a”h) states in his Sefer, Iggerot Moshe, that if one wraps food in tin foil for the purpose of maintaining its heat, he may not place the wrapped food on the blech before Shabat.
Interestingly, however, Rav Moshe’s son, Rav Reuven Feinstein, reported that his mother frequently placed kugel wrapped in tin foil on the blech before Shabat. Rav Reuven explained that his father’s ruling applied only to situations where the food is wrapped for the specific intent of keeping it warm, and generally speaking, people wrap food in foil for the sake of cleanliness, either to keep the food clean or to avoid crumbs falling on the blech. In essence, the tin foil serves as a utensil to contain the food, not as an instrument for keeping it warm. As such, placing it wrapped on the blech or in the oven would not constitute Hatmanah.