To understand the stages of the soul and its purpose will take you years to understand and learn the beautiful setup and concept by Allah SWT. But just in a very simple stage we can believe.
Al-Ghazali writes:
فالقلب في حكم مرآة قد اكتنفته هذه الأمور المؤثرة فيه وهذه الآثار على التواصل واصلة إلى القلب أما الآثار المحمودة التي ذكرناها فإنها تزيد مرآة القلب جلاء وإشراقاً ونوراً وضياءً حتى يتلألأ فيه جلية الحق وينكشف فيه حقيقة الأمر المطلوب في الدين
For the heart is in the position of a mirror that is surrounded by influences and these effects proceed in succession to the heart. As for praiseworthy influences that we have mentioned, they will polish the mirror of the heart and increase it in brilliance, light, and radiance until the clarity of the Truth shines from within it and the reality of the matter sought in religion is unveiled within it.
So conclusion:-
أحدهما أنه يراد به المعنى الجامع لقوة الغضب والشهوة في الإنسان على ما سيأتي شرحه وهذا الاستعمال هو الغالب على أهل التصوف لأنهم يريدون بالنفس الأصل الجامع للصفات المذمومة من الإنسان فيقولون لا بد من مجاهدة النفس وكسرها
One of the intended meanings of ‘self’ is the combination of faculties of anger and appetite in the human being, and based on this it will be explained. This usage is prevalent among the scholars of spirituality (ahl al-tasawwuf), that they mean by ‘self’ the combined origin of blameworthy traits within the human being, such that they say one must strive against the self and break it.