Critical Hits
When you make an attack roll and get a natural 20 (the d20 comes up 20), you hit regardless of your target’s AC. If the total result of your attack roll meets or exceeds the target’s EAC or KAC (as appropriate for your attack), you’ve also scored a critical hit. You roll your damage twice, each time with all your usual bonuses and including any additional damage from special abilities, and then add the rolls together. Some weapons inflict a special effect on a target of a critical hit, in addition to dealing double damage (see page 182).
If the total result of your attack is less than your target’s relevant AC, your attack still hits on a natural 20, but it deals damage normally.
Source
Core Rulebook pg. 245