If you look at page 292:
If you are trained, a roll of 20 is not a critical if it doesn't equal or exceed the DC. But in that case, it is is a hit.
Ex. roll 20 + 10 against a DC of 31 is a hit but not a critical hit if you are trained.
'If your enemy is far more powerful than you or a task
beyond your abilities, you might roll a natural 20 and
still get a result lower than the DC. In this case, you
succeed instead of critically succeed or fail. If you lack the
proficiency for a task in the first place, or it’s impossible,
you might still fail on a natural 20.'
Also if you are not trained, a 20 can be a MISS according to the last part of that paragraph.
Ex. roll 20 + 10 against a DC of 31 is a miss if you are not trained.