Those who are in the process of gaining freedom are sub-divided into several stages; these being:

Both these attain these states by

1. The Stream-Attainer (Sotapanna)overcoming the defilements, by

2. The Once-Returner (Sakadagami)substitution of the opposites,
(Tadanga-Vimutti).

They both attain freedom for a
Short time.

3. The Never-Returner (Anagmi) …Who attains this state of freedom,
By suppression of the defilements,
(Vikkhambhana-Vimutti).
He gains freedom which lasting.

4.The Arahat …Who attains final deliverance by
Cutting off the defilements, (Sam-
Uccheda-Vimutti).1

He gains final and irrevocable freedom, because he has Transcendental-Knowledge (Nana), which knows that he has become free. This is called “Reviewing-Knowledge” (Paccavekkhanฺa-Nana). In other words, discriminating or defining knowledge does not increase in the Arahat. This is because the Citta which sets up the factors of the Noble-Path (Ariya-Magga) is of the type which is Non-Kamma-Forming-Associated-with-Knowledge, in the Sensual-Realm (Nanasam-payutta-Kamavacara-Kiriya). In other words, his Citta departs from both evil and good, which never arise within him again. Good and evil cease because of the ceasing of craving. There is then nothing to lead him into further becoming.
Craving, which is the same thing as the defilements (Kilesa), is what leads one to perform Kamma-which-leads-to-Becoming (Kamma-Bhava).

When one performs Kamma-which-leads-to-Becoming, then Grasping seizes it and clings to it. When one has seized the Kamma-which-leads-to-Becoming, the Result-of-Becoming (Uppatti-Bhava), which is the same thing as birth, arises again.
One’s birth is thus analogous to fire; one’s Kamma-which-leads-to-Becoming is like the cause of the fire; grasping is like a man who clings to the cause of the fire.

Those who still have to undergo training (Sekha), include the Stream-Attainer, the Once-Returner, and the Never-Returner. These have already attained to Transcendental-Knowledge
and Freedom, but their Cittas have returned again. This is because they have the type Citta which forms-good-Kamma-associated-with-knowledge in the Sensual-Realm (Nana-Sampayutta-Kamavacara-Kusala), which sets up the factors of the Noble-Path.

When one has that which is good, then one must also have it’s opposite which is evil; but in this case the evil tendencies are weak and are not able to give rise to birth in the realms of misfortune. The good tendencies therefore give rise to birth in the Human or Heaven-Realms again. This is because the five faculties
(Indriya) and the five powers (Bala)2 are still not fully developed, so that one has not fully completed one’s training. Therefore one must still persevere in getting rid of the evil and good which still remain. Because of this, when the Citta has attained freedom, one should then have reviewing-knowledge, for without this one
would obtain a Wrong-Deliverance (Miccha-Vimutti) which is an Unstable-State (Kuppa-Dhamma) which deteriorates. If, however, one has Reviewing-Knowledge, it does not deteriorate, and one attains the Unwavering-State (Akuppa-Dhamma).
Don't forget Stages One and Two.

Those things which concern the attainment of the states of form and form-lessness are given in the second stage in order to suit the desires of those who wish to practice Dhamma of all types and realms, for one may take the direct road or go a long way round as one may like.

Summarising those things which come under:

Stage 1. Concentrate one's attention on the Heart-Base, in order to get to know the formations (Sankhara). But one still cannot quell the formations, so this state is in the Sensual-Realm.

Stage 2. When one concentrates one’s attention on the Heart-Base, it is seen to be empty when there are no thoughts in the three times. Then, one has extinguished the formations of the Sensual Realm. But one is still attached to knowledge which is in the present, and one cannot become free from present objects; which means that it only helps one to attain the states of Form and Formlessness. This is “Samatha” -the method of calming the mind, but Insight (Vipassana) which has been mentioned above, is the way of leading the mind beyond.