Today's mechanic of choice is healing. In 5E RAW, characters recover all their hit dice and all hit points every night.
Yes. Hit points are an abstraction. This is to circumvent the tiresome "who's going to play the cleric?" routine that was so prevalent in earlier editions, or the stack of cheap '
wand of cure light wounds' that every party seemed to turn to after every battle in 3.x. There is the optional 'Gritty system' in the DMG if you want more of an attrition based game with a more cautious approach. There is also the 'lingering wounds' optional system to give the game an even more gritty feel if one so desires.
Think about the setting implications of this for a minute. No matter what you do, how badly you injure yourself, as long as you are not dead, you will be fully healed the next day as long as you get to bed for 8 hours. You could be starved and tortured for months, go to bed. You could fall off a building, go to bed. You could be impaled on a spike, go to bed. Everything is made better if you go to bed.
Whoa whoa there! As far as I can recall, D&D has never had much in the rules for injuries, impaling and the like beyond the abstraction of hitpoints and perhaps some alternate systems that popped up here and there over the years. As long as you have at least one HP, you can climb a cliff, run a marathon, or whatever physical excretion or activity you desire with no hindrance at all. Gygax even had a couple paragraphs in the original DMG/PHP explaining that hit points were not meat points and did not really represent being able to take more sword blows to the gut as you got better and more experienced at adventuring, but rather you became more skilled at avoiding such and had more luck, mojo and basically plot protection. Your above scenario has always been true in D&D, which gave you, what 1 + con mod hp per rest? Slower, but just as unrealistic, especially with peasants that had 1d4+1 hp (?). No matter what happens, as long as they don't die they get rest a couple of days and be good as new.
The rules in the PHB have never been much of fantasy world physics simulator (that was 3.x's mistake, trying to go too far down that path, IMHO), but rather a manageable way for players to build characters to interact with a fantasy world narrative. There can still be sickness, impaling, starvation, and broken bones in the
world, but that is outside the HP rules in the PHB and more the province of the DM's narrative and add on systems previously mentioned: more gritty HP recovery, lingering wounds, etc. The rules as they stand, are more geared to facilitate smooth and enjoyable gameplay that avoids the 'gaming the system' workarounds that had been widely employed in the past, because D&D is a
game, after all. The default may not be to everyone's liking, but there are dials to adjust, with varying degrees of success.