A post-mortem is an analysis/discussion of a game conducted by the two players right after the game has ended. The goal is to analyze the game as objectively as possible, and to gain a sense of how your opponent saw the game. What did they think the critical moments were and how did their evaluation of key positions differ from yours?.
In general both players should be respectful of one another and seek their opponent’s perspective. A post-mortem is also a great opportunity to find possible ideas/resources that were missed during the game. The process can take anywhere from 20 minutes to several hours, depending on the length of the game, if there is another tournament round coming up, etc.
There’s no such thing as a “perfect post-mortem”. The idea is just to hear what your opponent was thinking (as this can point out deficiencies in your own understanding), and to get a jump-start on your eventual game analysis.
HOW POST-MORTEMS WORK
Both players should analyze on the same board, using either a physical board or shared online analysis board on Chesscom/Lichess.
If conducted online, the players should also initiate a voice/video call using Discord/Zoom/Skype etc.
KEY QUESTIONS TO ASK
Who won the opening battle—did White get an advantage or did Black manage to equalize?
What were the key mistakes of the game? Which moves would be better?
Were there any key alternatives that either player considered during the game?
In general, either player is "allowed" to ask for/decline a post-mortem. However, some players may get upset after losing a game or drawing from a winning position, and might not be interested in discussing the game at that point.
In tournaments, there is often limited time between rounds and some players would rather just rest up for the next game, which is perfectly reasonable as well.
Between strong players, a post-mortem is often done without a board but rather via blindfold discussion, especially when there is limited time.