The Buddha uses the simile of a bonfire to explain how perceiving gratification in objects that can be grasped at leads to clinging, to suffering, and how perceiving drawbacks in objects that can be grasped at leads to the cessation of clinging, to the ending of suffering.
Upādāna sutta - Clinging
At Sāvatthi.
"Bhikkhus, when one dwells perceiving gratification in objects that can be grasped at, craving increases. Dependent on craving, there is clinging; dependent on clinging, there is becoming; dependent on becoming, there is birth; dependent on birth, there arises aging and death, sorrow, lamentation, pain, displeasure, and despair. Thus there is the arising of this whole mass of suffering.
Just as, bhikkhus, if a great bonfire were burning and blazing from ten, twenty, thirty, or forty cartloads of wood, and a person from time to time were to throw dry grasses, dry cow dung, and dry sticks onto it, that great bonfire, being fueled and sustained by that, would burn and blaze for a long time.
In the same way, bhikkhus, when one dwells perceiving gratification in objects that can be grasped at, craving increases. Dependent on craving, there is clinging; dependent on clinging, there is continued existence; dependent on continued existence, there is birth; dependent on birth, there arises aging and death, sorrow, lamentation, pain, displeasure, and despair. Thus there is the arising of this whole mass of suffering.
Bhikkhus, when one dwells perceiving the drawbacks in objects that can be grasped at, craving ceases. From the cessation of craving, there is the cessation of clinging; from the cessation of clinging, there is the cessation of continued existence; from the cessation of continued existence, there is the cessation of birth; from the cessation of birth, aging and death, sorrow, lamentation, pain, displeasure, and despair cease. Thus there is the cessation of this whole mass of suffering.
Just as, bhikkhus, if a great bonfire were burning and blazing from ten, twenty, thirty, or forty cartloads of wood, and a person were to not throw dry grasses, dry cow dung, and dry sticks onto it from time to time, that great mass of fire, being depleted of the former sustenance and not provided with any new fuel, would be extinguished.
Just so, bhikkhus, when one dwells perceiving the drawbacks in objects that can be grasped at, craving ceases. From the cessation of craving, there is the cessation of clinging; from the cessation of clinging, there is the cessation of continued existence; from the cessation of continued existence, there is the cessation of birth; from the cessation of birth, aging and death, sorrow, lamentation, pain, displeasure, and despair end. Thus there is the cessation of this whole mass of suffering."