On Yom Tov, a fire may be extinguished (kibui) only for the needs of okhel nefesh. Otherwise, it is forbidden. Even if all of one’s possessions are going up in flames, extinguishing the fire is prohibited as long as there is no danger to human life. Lowering a flame is also prohibited when there is no tzorekh okhel nefesh, as this of necessity involves extinguishing part of the flame (Beitza 22a; SA 514:1-2; Peninei Halakha: Shabbat 16:6-7).
In contrast, extinguishing a flame as part of food preparation is permitted. Therefore, raw meat may be placed upon coals, even though the juices dripping from the meat will initially put out part of the flame (Shabbat 34b; SA 511:4). Spices may also be put on the coals in order to infuse fruit with their flavor, even though initially the spices will put out part of the flame. Similarly, the flame under a pot of food may be turned down if it is so high that the food in the pot will burn. However, if a lower flame is available, the pot should be transferred there, thus avoiding unnecessary kibui.[2]
Let us say a fire is threatening to burn down one’s home, where he is planning to eat his Yom Tov meals. Alternatively, the fire is threatening to ruin the crockery and cutlery with which he is planning to eat the meals. May it be extinguished? Poskim disagree. Some prohibit extinguishing the fire, as doing so does not directly affect the food (Rif; Rambam; SA 514:1). Others permit it, maintaining that the permission to perform melakha for okhel nefesh includes the permission to protect the place in which one will eat and the crockery and cutlery with which one will eat. Therefore, as long as one does not have anywhere else convenient to eat besides his home, he may put out a fire which is about to burn it down. Similarly, if he cannot lay hands on other crockery and cutlery with which to eat, he may extinguish the fire which is about to ruin them (Mordechai; Ran; Rema 514:1; MB ad loc. 8). Since this is a disagreement pertaining to a rabbinic law, the lenient opinion may be relied upon when necessary.