There is no explicit statement about this
I first wanted to answer, as Thomas has pointed out, with the passage in the DMG about metagame thinking. However, on a close read, that passage talks about the players thinking about the game as a game, not about what the characters would know or would not know about things like hit dice. Both of the examples are about the narrative of the story - it would have been easy to make one about character observing game mechanics instead. I think it is the closest thing we have, but it is not explicit.
Even the fundamental loop of How To Play (PHB, p. 6), which explains the relationship of
- The DM describes the environment
- The players describe what they want to do.
- The DM narrates the results of the adventurers’ actions.
does not explicitly address this (and it even muddles the player and the character -- strictly speaking, it should say "2. The players describe what they want their characters to do"). I think this is because this is such a natural assumption that the authors did not think to express it, and it is not normally a major issue for enjoyable play that needs resolution, although it can come up from time to time.
The best indication we have that there is this separation is that except in very rare examples, like the one TheLittlePeace cited, the language in the PHB rules always addresses the player or reader with "you" when it comes to game mechanics1, it is not talking about the character. For example on page 6, PHB (italics for emphasis added):
Part 2 details the rules of how to play the game, beyond the basics described in this introduction.That part covers the kinds of die rolls you make to determine success or failure at the tasks your character attempts,
You can see the separation implied here: the player makes the rolls for the things the character attempts. The character is trying to do stuff, in the game world, the player is resolving them using the game rules. But it is really never 100% clear cut, as it is easy to mix up character and player in writing.
Counterexamples in the rules that suggest the characters know
There are also a few instances, where the rules require the characters to know about game mechanics to make decisions on using their abilities, such as the silvery barbs spell, which says:
Casting Time: 1 reaction, which you take when a creature you can see within 60 feet of yourself succeeds on an attack roll, an ability check, or a saving throw
Saving throws need not have an observable result, for example they do not if you try to charm someone. That means, the character to cast this spell must know what mechanics just happened. Now, that is awkward, and I think this spell, and a few other instances like it, are more of the exception that proves the rule, even if the rule is not spelled out explicitly.
Or, the Fighter's Know Your Enemy feature says:
Starting at 7th level, if you spend at least 1 minute observing or interacting with another creature outside combat, you can learn certain information about its capabilities compared to your own. The DM tells you if the creature is your equal, superior, or inferior in regard to two of the following characteristics of your choice:
- Strength score
- Dexterity score
- Constitution score
- Armor Class
- Current hit points
- Total class levels (if any)
- Fighter class levels (if any)
How does that work, if the fighter as a player character has no concept of what for example class levels are? It is not impossible to get around it – you can couch this in describing that he realizes the other fighter is "more experienced" than himself, but it takes some effort. Hit points are tricky, too, as they "represent a combination of physical and mental durability, the will to live, and luck" (PHB, p. 196), so what does the fighter learn here? That the other guy currently still has more will to live than he himself?
Lastly, there are section in the rules that make it sound like not the player is making the check, but the character, for example the Forage activity while traveling says
Forage. The character can keep an eye out for ready sources of food and water, making a Wisdom (Survival) check when the DM calls for it.
This reads natural, but really, it should be the character keeping an eye out, and the player making a check for the character, when the DM calls for it. But writing it like that is just too cumbersome. You don't want the extra verbiage every time the character tries to do something and a check has to be made.
1 Not always, though. The Combat chapter tells us that "you" in it can refer to either player or character depending on context:
Throughout this chapter, the rules address you, the player or Dungeon Master. The Dungeon Master controls all the monsters and nonplayer characters involved in combat, and each other player controls an adventurer. “You” can also mean the character or monster that you control.