So, one of your players makes a risky move, the dice gods disapprove, and their PC dies. For one reason or another, no one in the party is able to revive the PC.
I'll start by saying the worst thing you can do, IMO, is have the player just sit there until the end of the session, and I think most GMs understand that.
I give my players a couple of options:
1 .Take a few minutes to roll up a character, and jump in. (Since they had to do it on the fly, I let them change things after the session when they've had time to really think about the new PC)
2. Play the monster(s) that the other PCs will face, and roll up a new character at home for the next session (at the same level that the rest of the party is at)
3. Play an NPC if one is available and has more than a bit part.
4.Go home, and bring a new character in for the next session.
When the player rolls up a new character in this situation, I just assume that the new PC has always been part of the party from day one, and the game continues as normal.
I once had a PC that died, and the DM wouldn't let me play until I could figure out an in game reason for the new PC joining the party (and that also he had to review and approve). IMO, that's not fun, and really unnecessary.
So, with all that being said, what do you do?