Imām Ibn al-Qayyim -may Allāh have mercy on him- said:
The one seeking Allāh and the abode of the hereafter, his journey and quest will not be correct except by way of two confinements:
Confining his heart upon only his quest and his goal and confining it from inclining towards other than it.
And confining his tongue from what does not benefit. And confining it upon the remembrance of Allāh and what increases his faith and knowledge.
And confining his limbs from acts of disobedience and desires. And confining it upon (performing) the compulsory acts of worship and the recommended ones.
And he does not leave the confinement until he meets his Lord. There and then, He (Allāh) removes him from the prison to the most expansive and pleasant space.
And when he fails to be patient upon these two confinements, and he flees from them towards the freedom of desires, He (Allāh) will punish him with the atrocious confinement upon his departure from the dunyá (world).
Hence, everyone who departs from the world is either being liberated from a confinement or going to a confinement.
Source: Al-Fawāʾid p. 54