This article explains the concept of sword mounds in Nioh.
Death in Nioh happens whenever William’s HP reaches 0. When he dies in the game, he will respawn at the last shrine that he prayed at, and all the Amrita (energy/currency) that he has collected up to that point will be taken from him. In addition, a sword mound will appear at the place where he died. Once he respawns, William can go to this sword mound and regain all the Amrita he lost, plus his Guardian Spirit.
The player should note, however, that if William dies again on the way to the sword mound, he will lose all of the Amrita he earned so far and the ones in the sword mound. The Guardian Spirit returns to the shrine that the player last prayed in.
If you play online, you may encounter a sword mound surrounded by a red aura. This is called a “bloody grave”, and it specifies the place where either an AI-controlled or online opponent died. There are two kinds of bloody graves: one that has the red aura around it, and another with sparks in addition to the red aura.
A revenant, or ghost warrior, will appear to challenge William once the bloody grave is examined. Defeating a revenant from a regular bloody grave results in William getting Amrita and an item drop, with a chance for multiple item pieces. On the other hand, defeating a revenant that spawned from a bloody grave with sparks gets you all the items as well as Amrita. Challenging revenants appears to be an effective way of farming items and more importantly, powerful weapons.