Some Humans believed that a person would be sent to a different afterlife, either Heaven or Hell, depending on their actions in life. A third related location was Purgatory. (TOS: "Space Seed"; VOY: "Concerning Flight") In 2365, CaptainPicard explained that there were two contemporary philosophies on death. One was the belief that death was the transformation into an indestructible and unchanging form. The purpose of the entire universe was to then maintain that form in an Garden of Eden-like place. The other was that death was simply blinking into nothingness. Picard himself believed that the existence of lifeforms was part of a reality beyond what was currently understood as reality and therefore both philosophies were insufficient. (TNG: "Where Silence Has Lease")

Many cultures believed that people would exist in the afterlife in a "pure" physical state, cured of health issues from their previous life. In 2368, when Geordi La Forge and Ro Laren were thrown out of phase by a transporter accident and declared dead by a crew that could not see them, the blind La Forge regarded the continued function of his VISOR as proof that, contrary to what Ro believed, they were still alive. (TNG: "The Next Phase")

Talaxians mythology had a belief in an afterlife known as the Great Forest, in which a great tree stood at the center. It was said that upon death, a Talaxian went to the afterlife and met the souls of their deceased family upon arrival. (VOY: "Mortal Coil")

Vulcans believed in the katra. Tuvok said that Vulcans believed a person's katra, or what some may call a soul, survived after death. Although he believed in it without question as a child, he recently experienced doubts. (VOY: "Innocence")

The Borg have no concept of an afterlife. However, the consciousness of individual survived as part of the Collective.(VOY: "Imperfection")

In 2369, after the failure of his artificial heart, Picard seemed to experience going to the afterlife run by Q as God. (TNG: "Tapestry")

A species of non-corporeal life forms who fed on the consciousness of corporeal beings used a Matrix to trap the minds of people close to death. The aliens needed the people to enter voluntarily, so they claimed that the Matrix was the afterlife. (VOY: "Coda") One such alien appeared to Janeway and claimed to be her father.

When Neelix died and didn't see anything, he felt so distressed that he thought of taking his own life. (VOY: "Mortal Coil"). Someone does have a dream about the Great Forest, however.

Quark had a dream about going to the Divine Treasury.

In 2375, Julian Bashir and Miles O'Brien were near death while exploring the mind of Luther Sloan. Seeing a light appear in a certain corridor, O'Brien suggested it was The Great Beyond. (DS9: "Extreme Measures")