The soul comes out of Zeir Anpin and Malchut of Atzilut. In the original state the soul has the aspects of vessels from Keter, Chokmah, Binah, Zeir Anpin and Malchut and the lights of Nefesh, Ruach, Neshama, Chaya and Yechida. When it comes of Atzilut, the soul transforms to three separate lines. The right line enters the world of B’riah and receive the soul level of Neshama. The left line connects to the level of Ruach in the world of Formation. The center line connects the level of Nefesh in the world of Asiah, Malchut, the physical body.
The upper three sefirot of each level stays in the supernal world above it. The vessels of the upper levels falls to the level below to allow connection to the light in the upper level. The system was made this way to give the soul the ability to grow by climbing higher.
The level of Nefesh and Ruach are included in each other at the time of birth. The level of Neshama stays separated and can be drawn down if the person follows the righteous path.
If one chooses to purify himself in order to achieve higher levels then he gets help to receive the Neshama level that is the holy part of the soul. Then that person is called holy. If one is not on the righteous path then that person stays with the Nefesh and Ruach levels. If he connects to impurities, he loses the levels he has and stays with pure animal soul level of Nefesh.
Repentance, Teshuvah, would draw supernal support and higher levels of the soul according to the actions of that person.
Each one of us can achieve the holy level of the soul, Neshama. In practical terms, each one of us have at least the level of Nefesh that connects the soul to the body and provides life. This is pure animal soul. Wicked people have impure animal soul. Following the spiritual laws of the Torah would lead us to achieve the pure levels of Nefesh and Ruach. That means spiritual connections sharing, tithing while avoiding all negative actions and situations.
When adding greater levels of Torah studies and living a selfless life, helping people beyond the norm one can achieve the holy level of Neshama. This level can go away fast if one connects to impurity of any kind.