Humans were created by God in His image. (Genesis 1:26, 27) “And God said, Let us make man in our image, after our likeness: and let them have dominion over the fish of the sea, and over the fowl of the air, and over the cattle, and over all the earth, and over every creeping thing that creepeth upon the earth. So God created man in his own image, in the image of God created he him; male and female created he them.” Since God is a trinity, there must be a trinity in humans, as well. That would be body, soul, and spirit. When Adam and Eve sinned, some part of them died. God had said, (Genesis 2:6-7) “And the LORD God commanded the man, saying, Of every tree of the garden thou mayest freely eat: But of the tree of the knowledge of good and evil, thou shalt not eat of it: for in the day that thou eatest thereof thou shalt surely die.” Since their bodies did not die on that day, and their souls did not die on that day, it must have been their spirit that died. That spirit is what is born anew when a person comes to Jesus Christ for salvation. That is what being born again means.
Consider (Hebrews 4:12) “For the word of God is quick, and powerful, and sharper than any twoedged sword, piercing even to the dividing asunder of soul and spirit, and of the joints and marrow, and is a discerner of the thoughts and intents of the heart.”
I would differentiate between soul and spirit like this. The soul is the system within the body that allows it to live. The brain and the nervous system are a part of the soul. At physical death, the blood is still in the body, the muscles are still there, the teeth and all body components, assuming that some were not destroyed in the act of death. However, those body parts cease to operate. That is because the soul dies. So, an unsaved person has a body and a soul. That is only a dual component person, not a trinity. The spirit is made alive in a human at the new birth. That makes the complete person that God intends for humans to be. That spirit is able to communicate with the Holy Spirit, making it possible for the human to understand God’s Word. (First Corinthians 2:14) “But the natural manreceiveth not the things of the Spirit of God: for they are foolishness untohim: neither can he know them, because they are spiritually discerned.”
For more on the topic see: 0803 Creation