Once lit you can rest at a bonfire in order to refill your Estus Flasks and magic. After purchasing certain items, you may perform other activities such as repairing your equipment and strengthening your armor and weapons. You may regain your humanity at a Bonfire by trading 1 accumulated humanity while at a Bonfire. You can strengthen the Bonfire using accumulated Humanity in order to be able to carry more magic and Estus Flasks. When you die you will respawn at the last bonfire where you rested at.
Using a bonfire resets and respawns all normal enemies. Strengthened/Unique enemies and bosses will remain dead.
Each Bonfire has a bonfire keeper. Killing the Bonfire Keeper will remove the ability to light (and thus) activate the Bonfire again. If you kill the Bonfire Keeper of you lastly activated Bonfire, you will still respawn at said Bonfire upon dying. Estus Flasks and magic will still be re-filled.