There are two types of bloodstains in Dark Souls, which are; those left by the player, and those left by other players online. When a player dies, a bloodstain containing all their lost souls and "liquid humanity" is placed at a location roughly five seconds prior to their death.
When a player dies as a red phantom, the bloodstain is left on the exact location the player left their world, just before the loading screen.
Touching one's bloodstain recovers previously earned souls and humanity. Touching a bloodstain left by another player reveals their spirit, which enacts the last ten seconds of their life. In this way a player new to an area can take advantage of the mistakes of other players. It is only possible to examine one bloodstain at a time.