The most basic principle of koshering cooking utensils is that forbidden taste is released from the vessel in the same manner that it was absorbed: “ke-bole’o kakh polto.” There are two principal media through which utensils absorb taste: boiling liquid and direct flame.
If a pot absorbs a forbidden food through a process of boiling – for example, if it was used to cook ĥametz food like pasta or porridge – the pot is made kosher for Pesaĥ by immersing it in boiling water, which causes the ĥametz taste to be released. The same applies to ladles and serving spoons: when used with ĥametz foods hotter than yad soledet bo (hot enough to cause the hand to recoil), they absorb the taste of the ĥametz and must be koshered through immersion in boiling water.
However, if a vessel absorbs ĥametz through direct heat of fire, without a liquid medium – such as in the case of a cake baked on a tray, dough baked on skewers, or jachnun or kugel baked in a pot – it is koshered by means of heavy libun, that is, heating the vessel by fire until it gives off sparks or becomes red hot.
Absorption through a liquid medium is relatively mild, so boiling hot water is sufficient to extract the taste of the ĥametz from the utensil. Absorption into a tray or skewer is more intense, as the heat of the fire causes the taste of the food to be absorbed deep into the very particles of the utensil. Boiling water is insufficient to remove all of the absorbed taste, and such utensils must be koshered by the same means that they absorbed – by fire. This is “heavy libun,” in which the fire incinerates the taste that had been absorbed in the utensil.
To highlight the difference – hagala extracts the taste absorbed in the vessel, while libun incinerates it in situ.
Therefore, before undergoing hagala, a vessel must be cleaned of any residual food, because hagala releases the taste absorbed into a utensil but does not destroy the residual food stuck to it. There is no need, however, to clean a utensil before libun, because any food that remains will be completely incinerated in the libun process.