Aquinas and Aristotle thought that material things are a composition of form and matter.
The form of something is an abstraction. Plato believed that the forms of things existed in reality on their own apart from any particular implementation of them. He had a more extreme realism. However, Aristotle and Aquinas had a more moderate realism. The form of something is really a way of describing something. But that description is really an abstraction. For example, the form of a triangle as having 3 sides does not actually exist on its own, but is an abstraction in our minds. It might exist in a particular triangle, but the universal form of all triangles does not actually exist like Plato thought. And nor does the particular triangle’s form continue to exist if that triangle is destroyed.
The word ‘soul’ is used instead of form when describing the form of something that is alive. Yet, for Aquinas it is still an abstraction. In fact Aquinas believed the animal soul ceased to exist when the animal died. The only reason that Aquinas believed the human soul continued to exist is because it was given something that no other animal had. And that is to be created in the image and likeness of God. Wisdom 2 calls it in the image of God’s immortality. And that we were not created for death. Aquinas says that the human soul was given the powers of intellect and will. And that this separates us from the animals and really all material things.
For every material or animal thing its form or soul corresponds completely 1:1 with its body. There is nothing that exists in the soul that does not correspond to its body. Thus, when the body dies the soul simply ceases to exist except as an abstraction in someone’s mind.
However, in humans that which comes to us from God as the intellect and will does not correspond 1:1 with the body. There is nothing for instance in the brain or any organ that can act as an intellect or a will. Indeed, no material thing or even a robot can not have an intellect or a will. It is physically impossible, despite what neurosurgeons or mathematicians say. Matter simply can not think about anything.
Thus, in humans something already exists apart from the body, the immaterial mind. And, thus, since it already survives apart from the body, it can continue to exist when the body dies. Aquinas thought we were given these powers of intellect in order that we can know God. And that this was the highest use of our intellect.