In Generation 1, the probability of a critical hit is based on the user's speed.
In the Generation I core series games, the threshold is normally equal to half the user's base Speed. If the move used has a high critical-hit ratio (Crabhammer, Karate Chop, Razor Leaf, or Slash), the move is 8 times more likely to be a critical hit (up to a maximum of 255/256). If the Pokémon has used Focus Energy or a Dire Hit, due to a bug, the user is 1/4 as likely to land a critical hit.
For normal crit-ratio moves:
With Focus Energy:
Generatio II onwards:
The probability of landing a critical hit is no longer based on the attacker's base Speed, but rather is based on a fixed formula for all Pokémon. Similar to stats, there are temporary in-battle stages used to determine the probability that a particular move will be a critical hit.
Chance of critical hit
Gen II-VI Gen VII onward
1/16 (6.25%) 1/24 (~4.167%)
Therefore, the chance of a crit is 6.25% or 1/16 in Gen II-VI, and after Gen VII it's 4.167% or 1/24.
Hope this helps!