There are "bonfire" savepoints throughout the game. These set your respawn points, as well as restore your health and status, and equip you with a number of "Estus Flasks;" the game's equivalent of an HP Potion. Default number is 5, although you have a number of collectible "Humanity Points" (up to 20, relatively rare), where you can use one to "kindle" the bonfire, permanently changing that number to 10. A special item found later in the game enables kindles of higher numbers, but usually 10 will suffice.
When you die, you drop a "bloodstain" that contains 3 things: a playback of how you died (for other players to observe until you recollect it or die again trying), the Humanity points you've acquired (yours resets to 0); and the souls you're carrying which are the main currency of the game. You can also spend these souls at a bonfire to level up your stats, so they kinda double as EXP. If you recover your bloodstain, they're restored to you; but if you die a second time before reaching it, the new bloodstain will replace the last, and those souls and Humanity points will be lost to the void.
It's not total despair, as there are items you can pick up and use which will increase your souls and Humanity points, and those stay with you until you decide to use them. Also, any time another player kindles the bonfire that you spawn from, it will give you an additional Estus Flask, and if you leave a hint message and it gets rated (up?), the game will increase your Humanity points by 1.
You can also use items like Cracked (Color) Eye Orbs to participate temporarily in another player's game - either to help or hinder them - and upon success, you're rewarded with more souls and Humanity for that as well. Flipside to that is that you must be in Human form to summon phantoms (of either type) that enable this online play (in your game, not theirs); and once you die, you must acquire at least one Humanity point, and spend it at a bonfire to change from Hollow form to Human form.