The soul is a creation of Allah, whose function is to bring life to the human body. It remains with the human body throughout life and departs at death. The soul is regarded as an immaterial aspect within the body of the human person. Some consider the soul to be an integral part of life and functions and also the source of the highest mental activities. The soul is almost synonymous with self (nafs).
Sheikh Ahmad Ash-Sharabasi, stated in his book Yas’alunak: One’s soul is the essence of one’s life. There are no explicit verses or hadiths that tackle the nature and essence of man’s soul. It may be that Allah Almighty has not dealt with that subject in detail so that He Almighty gives man the chance to contemplate and ponder over his life. This understanding may be in conformity with Allah’s saying: [They will ask thee concerning the Spirit. Say: The Spirit is by command of my Lord, and of knowledge ye have been vouchsafed but little.] (Al-Israa’ 17: 85) Allah’s saying here: […and of knowledge ye have been vouchsafed but little] encourages one to seeking further knowledge.

This reminds us of the following verses: […and say: My Lord! Increase me in knowledge.] (Ta-ha 20: 114), [Allah revealeth unto thee the Scripture and wisdom, and teacheth thee that which thou knewest not. The grace of Allah toward thee hath been infinite.] (An-Nisaa’ 4: 113), and [Read: In the name of thy Lord Who … teacheth man that which be knew not.] (Al-`Alaq 96: 5)
Some scholars defined man’s soul as a living transparent transcendental substance that is different from the physical body that it exists in; its existence in a body is a sign that the body is alive.
Other scholars described the soul as a light invisible substance such as air. It is to the body as water to plants, this is to say, as plants cannot live without water, so does the body without the soul.
Scholars have differed a lot over whether man’s soul exists or dies after his death, and where it exactly exists in man’s body. All that we can get from the religious teachings about the soul is that after one has died, one’s soul retains cognizance in a way that is only known by Allah Almighty; it also keeps a kind of relation to one’s body in a way that is also only known by its Almighty Creator. It is such kind of relation that makes it aware of him who visits one’s grave and greets one and makes it also feel happy or sad.