"Monks, these are the four developments of concentration. Which four? There is the development of concentration that, when developed & pursued, leads to a pleasant abiding in the here & now. There is the development of concentration that, when developed & pursued, leads to the attainment of knowledge & vision. There is the development of concentration that, when developed & pursued, leads to mindfulness & alertness. There is the development of concentration that, when developed & pursued, leads to the ending of the effluents.
"And what is the development of concentration that, when developed & pursued, leads to a pleasant abiding in the here & now? There is the case where a monk — quite withdrawn from sensuality, withdrawn from unskillful qualities — enters & remains in the first jhana: rapture & pleasure born from withdrawal, accompanied by directed thought & evaluation. With the stilling of directed thoughts & evaluations, he enters & remains in the second jhana: rapture & pleasure born of composure, unification of awareness free from directed thought & evaluation — internal assurance. With the fading of rapture, he remains equanimous, mindful, & alert, and senses pleasure with the body. He enters & remains in the third jhana, of which the Noble Ones declare, 'Equanimous & mindful, he has a pleasant abiding.' With the abandoning of pleasure & pain — as with the earlier disappearance of elation & distress — he enters & remains in the fourth jhana: purity of equanimity & mindfulness, neither pleasure nor pain. This is the development of concentration that, when developed & pursued, leads to a pleasant abiding in the here & now.
"And what is the development of concentration that, when developed & pursued, leads to the ending of the effluents? There is the case where a monk remains focused on arising & falling away with reference to the five clinging-aggregates: 'Such is form, such its origination, such its passing away. Such is feeling, such its origination, such its passing away. Such is perception, such its origination, such its passing away. Such are fabrications, such their origination, such their passing away. Such is consciousness, such its origination, such its disappearance.' This is the development of concentration that, when developed & pursued, leads to the ending of the effluents.
https://www.accesstoinsight.org/tipitak ... .than.html