These are the ‘planes of consciousness’ or ‘stations of consciousness’.
AFAIK, Buddhist cosmology holds that there are various realms (and subrealms) of existence, layered one on another. Think of how ‘our’ world is layered on the ‘microscopic’ world.
The realm in which the Consciousness of a Being will be reborn depends upon the habitual affinity of the Mind in the current birth. Thus, if one trains the Mind to repeatedly enter the meditative state of ‘neither perception nor non perception’ for example, then after death Consciousness will re establish itself in the formless realm as a Formless Deva. Such Devas have an extremely long life span … but no matter how long their existence, change occurs. With the exhaustion of the previously accumulated merit, the Formless Deva too shall die, and be reborn again. This is Suffering… much less than as a Human, but Suffering nonetheless.
Thus, by training the Mind to habitually enter such a base, one is not freed from the cycle of existence. Simply achieving various Meditative states therefore, does not permanently free one from Suffering.
The insight of the Buddha was that he understood the causality behind this - the reason why all meditative achievements, no matter how fine… simply led to further rebirths- it was because Craving was not ended. (DN15)
On the other hand, if Craving was understood and done away with, then the Mind would no longer be attached to anything at all. On the break up of the aggregates, since there was no residual craving, Consciousness would not reform on any plane of existence. It would simply go out/ go beyond the framework of description. There would be no rebirth, the endless cycle of existence would be broken. Hence there would be a permanent end to Suffering.
Thus to end Suffering, we do not need to achieve any fine Meditative states. Nor do we need to resort to extreme asceticism. We also don’t need psychic powers! (SN12.70) All we need is to bring the Mind to a sufficiently quiet state, free of the hindrances (aka Samadhi/ 1st Jhana) where we can investigate and understand the Dhamma and make an end to Craving by the smashing of Ignorance.
Snp 5.14
“To the meditator, rid of hopes,”
said Venerable Udaya,
“who has completed the task, is free of defilements,
and has gone beyond all things,
I have come seeking with a question.
Tell me the liberation by enlightenment,
the smashing of ignorance.”
“The giving up of both”
replied the Buddha,
“sensual desires and displeasures;
the dispelling of dullness,
and the prevention of remorse.
Pure equanimity and mindfulness,
with investigation of principles
running out in front—
this, I declare, is liberation by enlightenment,
the smashing of ignorance.”