Happy to help!
All things in the Cosmere, including people, exist in three Realm of existence: the Physical Realm, where their body resides, the Cognitive Realm, as the name implies, is the realm of the mind, and the Spiritual Realm, where one's Spiritweb or Spiritual DNA (sDNA) resides. When a person dies, their Connections between the three Realms are severed. Their body remains (usually) to decay into the soil, their Cognitive self passes on to the Beyond (whether that is the Afterlife or non-existence is left up to the reader's interpretation), and Spiritweb also eventually decays back into Investiture, going back to the Cosmere. Sometimes instead of passing on, the person's Cognitive self can linger behind as, what is called a Cognitive Shadow due to having to much Investiture. Different kinds of Cognitive Shadows exist within the Cosmere: we've seen them on almost all the worlds.