The spirit and the soul is an issue that is confusing to many - and rightfully so. Because we find in the Bible, that the two terms are only too often interchanged.
For example, in Gen.2:7, man became a living soul [KJV]. But in Ecc.12:7, the spirit returns to God who gave it [KJV].
We know that each of us has a body, soul and spirit, as found in 1 Thes.5:23.
However, there are a few passages of Scripture that help clarify the issue for us, such as the following:
"For the word of God is living and active. Sharper than any double edged sword, it penetrates even to dividing soul and spirit, joints and marrow; it judges the thoughts and attitudes of the heart." Heb.4:12.
As such, it can be understood that the spirit and the soul are an inseparable duo that can only be separated by God.
For a better understanding of it IMO, is to realize the soul is the character, personality, emotions and everything that makes each person, one of a kind, separate and unique from any one else. The spirit is the body for the soul, as recorded in 1 Cor.15:44.
The apostle Paul puts it this way: "It is sown a natural body, it is raised a spiritual body." 1 Cor.15:44.
Defacto