The Buddha describes four ways to attain final Nibbāna with or without exertion.

Sasaṅkhāra sutta - With Exertion

"Bhikkhus, there are these four kinds of persons found existing in the world. What four?

Here, bhikkhus, a certain person attains final Nibbāna with exertion in this very life. Here again, bhikkhus, a certain person attains final Nibbāna with exertion after the breakup of the body. Here again, bhikkhus, a certain person attains final Nibbāna without exertion in this very life. Here again, bhikkhus, a certain person attains final Nibbāna without exertion after the breakup of the body.

And how, bhikkhus, does a person attain final Nibbāna with exertion in this very life? Here, bhikkhus, a bhikkhu dwells contemplating the unattractiveness of the body, perceiving the unpleasantness of food, recognizing disenchantment in the entire world, and observing impermanence in all conditions. Moreover, the perception of death is well established within him. He lives relying on these five powers of a trainee: the power of faith, the power of sense of right and wrong, the power of fear of wrongdoing, the power of energy, and the power of wisdom. These five spiritual faculties develop strongly in him: the faculty of faith, the faculty of energy, the faculty of mindfulness, the faculty of collectedness, and the faculty of wisdom. Because these five faculties have developed strongly in him, he attains final Nibbāna with exertion in this very life. Thus, bhikkhus, a person attains final Nibbāna with exertion in this very life.

And how, bhikkhus, does a person attain final Nibbāna with exertion after the breakup of the body? Here, bhikkhus, a bhikkhu dwells contemplating the unattractiveness of the body, perceives the unpleasantness of food, recognizing disenchantment with the entire world, and observing impermanence in all conditions. Moreover, the perception of death is well established within him. He lives relying on these five powers of a trainee: the power of faith, the power of sense of right and wrong, the power of fear of wrongdoing, the power of energy, and the power of wisdom. These five spiritual faculties develop softly in him: the faculty of faith, the faculty of energy, the faculty of mindfulness, the faculty of collectedness, and the faculty of wisdom. Because these five faculties have developed softly in him, he attains final Nibbāna with exertion after the breakup of the body. Thus, bhikkhus, a person attains final Nibbāna with exertion after the breakup of the body.

And how, bhikkhus, does a person attain final Nibbāna without exertion in this very life? Here, bhikkhus, a bhikkhu, having secluded himself from sensual pleasures and unwholesome mental qualities, enters and dwells in the first jhāna, which is accompanied by reflection and examination, born from seclusion, and is filled with joyful pleasure. With the settling of reflection and examination, the bhikkhu enters and dwells in the second jhāna, which is characterized by internal tranquility and unification of mind, is without reflection and examination, born from collectedness, and is filled with joyful pleasure. With the fading away of joyful pleasure, he dwells in a state of equanimity, mindful and fully aware, experiencing ease with the body. I entered and dwelled in the third jhāna which the Noble Ones describe as 'one who dwells equanimous, mindful and at ease.' With the abandonment of ease and discontentment, and with the settling down of joy and sorrow, he enters and dwells in the fourth jhāna, which is characterized by purification of mindfulness through equanimity, experiencing neither-painful-nor-pleasant sensation. He lives relying on these five powers of a trainee: the power of confidence, the power of moral shame, the power of moral dread, the power of persistence, and the power of wisdom. These five spiritual faculties develop strongly in him: the faculty of faith, the faculty of energy, the faculty of mindfulness, the faculty of collectedness, and the faculty of wisdom. Because these five faculties have developed strongly in him, he attains final Nibbāna without exertion in this very life. Thus, bhikkhus, a person attains final Nibbāna without exertion in this very life.

And how, bhikkhus, does a person attain final Nibbāna without exertion after the breakup of the body? Here, bhikkhus, a bhikkhu, having secluded himself from sensual pleasures and unwholesome mental qualities, enters and dwells in the first jhāna, which is accompanied by reflection and examination, born from seclusion, and is filled with joyful pleasure. With the subsiding of reflection and examination, the bhikkhu enters and dwells in the second jhāna, which is characterized by internal tranquility and unification of mind, is without reflection and examination, born from collectedness, and is filled with joyful pleasure. With the fading away of joyful pleasure, he dwells in a state of equanimity, mindful and fully aware, experiencing ease with the body. I entered and dwelled in the third jhāna which the Noble Ones describe as 'one who dwells equanimous, mindful and at ease.' With the abandonment of ease and discontentment, and with the settling down of joy and sorrow, he enters and dwells in the fourth jhāna, which is characterized by purification of mindfulness through equanimity, experiencing neither-painful-nor-pleasant sensation. He lives relying on these five powers of a trainee: the power of confidence, the power of moral shame, the power of moral dread, the power of persistence, and the power of wisdom. These five spiritual faculties develop softly in him: the faculty of faith, the faculty of energy, the faculty of mindfulness, the faculty of collectedness, and the faculty of wisdom. Because these five faculties have developed softly in him, he attains final Nibbāna without exertion after the breakup of the body. Thus, bhikkhus, a person attains final Nibbāna without exertion after the breakup of the body.

These, bhikkhus, are the four kinds of persons found existing in the world."