The Buddha presents a series of similes for the five aggregates - physical form is akin to a lump of foam, feelings akin to water bubbles, perception like a mirage, volitional formations are like a tree without a core, and consciousness is similar to a magic trick.
Pheṇapiṇḍūpama sutta - The Simile Of The Lump Of Foam
Once, the Blessed One was dwelling in Ayujjhā on the banks of the river Ganges. There, the Blessed One addressed the bhikkhus:
Form As Lump of Foam
"Just as, bhikkhus, this river Ganges might carry along a large lump of foam, a person with good sight would see it, reflect on it, and thoroughly examine it. Upon seeing it, reflecting on it, and thoroughly examining it, it would appear to him as empty, hollow, and without essence. For what essence could there be in a lump of foam, bhikkhus?
In the same way, bhikkhus, whatever form there is, whether in the past, the future, and the present... whether far or near, a bhikkhu sees it, reflects on it, and thoroughly examines it. Upon seeing it, reflecting on it, and thoroughly examining it, it appears to him as empty, hollow, and without essence. For what essence could there be in form, bhikkhus?
Feelings As Water Bubbles
Just as, bhikkhus, during the autumn season when the sky is thick with clouds and it rains, bubbles form on the surface of the water. A person with good sight would see them, reflect on them, and thoroughly examine them. Upon seeing them, reflecting on them, and thoroughly examining them, they would appear to him as empty, hollow, and without essence. For what essence could there be in a water bubble, bhikkhus?
In the same way, bhikkhus, whatever feelings there are, whether in the past, the future, and the present... whether far or near, a bhikkhu sees them, reflects on them, and thoroughly examines them. Upon seeing them, reflecting on them, and thoroughly examining them, they appear to him as empty, hollow, and without essence. For what essence could there be in feelings, bhikkhus?
Perception As Mirage
Just as, bhikkhus, during the last month of the hot season, at midday, a mirage shimmers. A person with good sight would see it, reflect on it, and thoroughly examine it. Upon seeing it, reflecting on it, and thoroughly examining it, it would appear to him as empty, hollow, and without essence. For what essence could there be in a mirage, bhikkhus?
In the same way, bhikkhus, whatever perceptions there are, whether in the past, the future, and the present... whether far or near, a bhikkhu sees them, reflects on them, and thoroughly examines them. Upon seeing them, reflecting on them, and thoroughly examining them, they appear to him as empty, hollow, and without essence. For what essence could there be in perceptions, bhikkhus?
Volitional Formations As Coreless Tree
Just as, bhikkhus, a man seeking heartwood, searching for the essence of heartwood, and on a quest for heartwood, taking a sharp axe, would enter the forest. There he would see a large banana tree, straight, young, and without a defect. He would cut it at the root; having cut it at the root, he would cut off the top; having cut off the top, he would peel away the outer sheaths. Peeling away the outer sheaths, he would not find even softwood, much less heartwood. A person with good sight would see it, reflect on it, and thoroughly examine it. Upon seeing it, reflecting on it, and thoroughly examining it, it would appear to him as empty, hollow, and without essence. For what essence could there be in the trunk of a banana tree, bhikkhus?
In the same way, bhikkhus, whatever volitional formations there are, whether in the past, the future, and the present... whether far or near, a bhikkhu sees them, reflects on them, and thoroughly examines them. Upon seeing them, reflecting on them, and thoroughly examining them, they appear to him as empty, hollow, and without essence. For what essence could there be in volitional formations, bhikkhus?
Consciousness As Magic Trick
Just as, bhikkhus, a magician or a magician's apprentice might display a magic trick at a crossroads. A person with good sight would see it, reflect on it, and thoroughly examine it. Upon seeing it, reflecting on it, and thoroughly examining it, it would appear to him as empty, hollow, and without essence. For what essence could there be in a magic trick, bhikkhus?
In the same way, bhikkhus, whatever consciousness there is, whether in the past, the future, and in the present... whether far or near, a bhikkhu sees it, reflects on it, and thoroughly examines it. Upon seeing it, reflecting on it, and thoroughly examining it, it appears to him as empty, hollow, and without essence. For what essence could there be in consciousness, bhikkhus?
Seeing thus, bhikkhus, the instructed noble disciple grows disenchanted with form, grows disenchanted with feelings, grows disenchanted with perceptions, grows disenchanted with volitional formations, grows disenchanted with consciousness. Disenchanted, he becomes dispassionate. Through dispassion, he is liberated. When liberated, there is insight that he is liberated. He understands: 'Birth is ended, the spiritual life has been lived, what had to be done has been done, there is no more coming to any state of being.'
Thus spoke the Blessed One. Having said this, the Well-Gone one, the teacher, further said:
Verse
"Form is like a lump of foam, Feeling is like a water bubble; Perception is like a mirage, Volitional formations are like a banana tree; And consciousness is like a magic trick, So taught the Kinsman of the Sun.
As one reflects on them, Thoroughly examines them; They appear as empty, hollow, and without essence, To one who sees them thus.
This body too, when comprehended By the one with great wisdom; Is seen as having abandoned the three things, Form as discarded.
When life, heat, and consciousness Depart from this body; It lies there thrown away, Like an inanimate thing discarded by others.
Such is the continuity of this illusion, A babble of children in a magic show; It is described as a murderer, With no essence to be found therein.
Thus should a bhikkhu contemplate the aggregates, With energy aroused; By day or by night, Ever mindful and aware.
One should abandon all attachments, And make oneself one's own refuge; Living as if one's head was on fire, Aiming for the imperishable goal."