Because lighting a fire on Shabbat is prohibited, it is difficult to keep food warm. Nowadays we have electric platas that solve this problem, but in the times of the Sages this was a great challenge. One way to accomplish this was to place the pot of cooked food in the oven (as explained above in sections 14-16). Another way was through hatmana (insulation): enveloping the pot in wool or a different material to preserve its heat.
However, there are two rabbinic prohibitions that limit hatmana. The first applies before Shabbat, and the second on Shabbat itself. The first prohibition is that one may not insulate using a material that itself generates heat, such as hay or olive dregs. This prohibition goes into effect even before Shabbat begins, as the Sages were worried that if people insulated foods on Friday using these materials, they might mistakenly conclude that it was permissible to insulate foods on Friday using coals, and they would end up stoking the coals. Therefore, the Sages forbade insulating foods before Shabbat using heat-generating materials. However, one may insulate food using materials that do not generate heat, such as clothing, towels, blankets, and the like, as long as one does this before Shabbat.
The second rabbinic prohibition is that one may not insulate warm food on Shabbat itself, even when the material used does not generate additional heat. This is due to the concern that if insulating on Shabbat were permitted, some people would first heat the food on the fire and then insulate it, thus violating the prohibitions of Mav’ir and Bishul (SA 257:1-3).
One may fill a thermos with hot water on Shabbat, because placing something hot into a utensil is not considered hatmana. Similarly, one may place a bag of rice or other cooked foods in a cholent pot while keeping it separate from the cholent, because hatmana does not apply to insulating one food within another.[25]