When I first began playing D&D back in the 1990's, character death was an extremely real possibility, and many characters didn't make it to level five or higher. I used to carry around with me a manilla folder titled "DEAD CHARACTERS" and inside were all my character sheets with beloved characters who had died adventuring. Scrawled across the pages in marker were the words "DECEASED" and then a very short description of how they died. One halfling character I'd made was attempting to flee some orcs and walked across what he thought was a giant log but was actually a giant alligator. Let's just say he didn't make it across. So, his sheet read "DECEASED: MAULED BY GIANT ALLIGATOR". I took a certain pride in the collection of my dead characters. However, the question remains for new players or for players of new editions - how to handle character death? It's different for everyone, so let's chat about some ways in which it can be handled.
I think the easiest way in which to gauge your players' interest in possible character deaths affecting the game is to just be upfront with them about what sort of campaign it is. For example, a typical romp through a normal D&D setting might include the possibility of character death, but it wouldn't be ever-present and just waiting at the edges of reality. But, say, in the Curse of Strahd campaign setting - death is very real and could come very quickly. At its heart, D&D is a game with game mechanics, and so the numbers are geared very early on in an adventurer's career toward a fast-approaching end. A DM wishing to run a game and who is worth their salt would most likely have several different campaigns in mind, anyway, and so asking your player what sort of game they'd prefer is key to everyone's happiness. Maybe after playing softer games, your players might want to try a grittier style in which their characters are constantly in danger.
My players always know that character death can happen. However, they also know I'm most likely not going to go out of my way to kill their characters out of spite or that I won't give them a chance to get out of it somehow unless they wish for their character to die for story reasons or to make a new character. Even then, I would make sure the death was meaningful. When it comes to players who don't know my style of running games, I just make sure to ask them lots of questions. Running a game at a local convention a couple of months ago, there was a teenager who just wanted to do "cool" and epic things, hoping the dice would go in his favor each time. However, there was a point where the party was trying to cross a rickety rope bridge and had managed to secure it using multiple ropes and other equipment to gird the bridge and make it crossable. However, this player ignored the bridge and tried to jump across. I warned him that the chasm was very hard to leap across and was extremely deep. With a smirk, he repeatedly told me it's what he wanted to do. Naturally, if he'd achieved a good role, I would have tried to narrate his success believably, but he rolled a 2. Halfway across the chasm, his character's musclebound body plummeted to the bottom of the chasm, and he took over 100 damage - instantly killing him. I shrugged as I told him his character was now dead, and the rest of the party, tired of his shenanigans, was ready to let him stay dead. However, he kept pleading with me, and I felt bad for him since he was just trying things out and everyone was there to just have fun, so I put it to a vote to be fair to everyone else, and they voted to allow him to pretend he'd never actually done it and that he'd simply had a premonition. Putting it in the player's hands enabled them to think about it and become part of the decision-making process so that it didn't feel personal just coming from me as a DM they didn't know. This player went on to one-shot the BBEG, so take that how you will. But my point with all that was YES as the DM I could absolutely have let the dice fall, so to speak, but why would I want there to be one extremely dissatisfied player during a one-shot at a convention? He thanked me in the end, and the other players still had fun. That's the main thing we're all going for. Hopefully, it taught him not to showboat.
One thing that's important to remember, too, is that as a DM you have the ability to fudge rolls. This is frowned upon by some, and again - you want to gauge your players with possibly a questionnaire before beginning the campaign or adventure but just warn them ahead of time if death is waiting around every corner. One game during my current campaign, a player just had extremely bad rolls and during the action I'd forgotten to factor in a crucial die roll on my own end and after the player had accepted that his character was now most likely dead, I revealed to him that actually "this was forgotten, and so your last roll wouldn't have been necessary, so actually combat would have ended" etc. That was my fault, so I just changed it without question and explained why to the player, who was grateful. But I've also been known to fudge rolls slightly if it will make the story more exciting. For example, if I roll to hit and it would completely kill a character by putting them into the negative HP range for permadeath, I might fudge it slightly and put them just at the edge. Or vice versa for a villain. Once, just because it was cool, I let an Orc live who was on fire and pierced by arrows. He actually pulled one of the arrows out of his side and used it to fire back at a player - igniting the arrow with the flames burning his own body. The players loved it so much they still refer to that unnamed, badass orc.
Finally, if a character MUST die - preface that possibility by maybe having a beloved NPC die. Also, make the death mean something. A player had left one of my campaigns, but I couldn't just explain away their character leaving suddenly so I kept the character as a DM NPC and eventually planned out an epic death for her. It was during a crucial moment, and the players were so affected by her death that they were visibly shaken. There was an entire session for her funeral and eventually the characters constructed a monument to her at which they could pay their respects. It was a touching moment, and if I'd just let her die to a random event, it wouldn't have meant nearly as much.
All in all, just have fun and communicate with your players. If you're a DM - read the room. If the character death seems like it might ruin someone's week or even day, maybe think about at least reminding them that their character could be resurrected if they wish. Maybe they can roll a new character to help quest to bring their last one back to life. If you're a player, just tell your DM your preferences for character death, and see about maybe finding a middle ground with them. Acknowledge that character actions can and should have consequences and that your DM is most likely actively trying to keep you alive by reminding you of them several times with decisions you make. Let us know what you think about character death in your games, and if you've had experiences similar to mine. Or maybe a character death has really affected you. Thanks for reading, as always! - Joe