A natural 20 is automatically a hit, and threatens to be a critical, then you re-roll for confirming the critical (for which it has to be higher than the enemies AC to a maximum of 20).
Now if you're wielding a keen rapier you threaten a critical anywhere between 15-20 on the attack roll. What if that wouldn't be a hit though?
For example you roll a 15, attack bonuses are +4, enemies AC is 20. If it was a normal roll that would definitively be a miss, but it was a potentially critical roll; yet it wasn't a natural 20. Does it hit?