A Critical Hit is an effect applied randomly to an attack which grants it increased damage output. Like a lot of the core mechanics of Pokemon, the way crits work have changed a lot over the years. As you are specifically asking about Generation 1 games (Pokemon Red, Blue Yellow and Green), this is how it works for those games specifically:
A critical hit occurs randomly. A number is randomly drawn from 0 to 255. This is then compared with a "threshold" value (also 0-255) that is calculated based on the factors below. If the random number is less than the threshold number, the attack is a critical hit.
Because of the way this calculation is performed - all possible values fall between 1/256 and 255/256 chance. Yes, this means it is impossible to guarantee a critical hit in Generation 1 games.
There are multiple different factors that can influence the threshold calculation (and therefore, the chances of a critical hit occurring):
- The attacking Pokemon's Base speed - the higher the base speed of the Pokemon, the higher the chance of a critical hit. Because it uses the base speed, and not the Pokemon's calculated speed, things like stat ups and EVs do not factor in.
- Dire Hit or Focus Energy - These are supposed to increase the chances of crits, but are actually bugged - instead, they reduce the chances of a crit occurring.
- A move's critical hit ratio - Crabhammer, Karate Chop, Razor Leaf and Slash all have a high critical-hit ratio.
When a critical hit occurs, the attacking Pokemon's level is doubled during the damage calculation, which (approximately) doubles the damage dealt. Crits ignore all in-battle stat buffs or debuffs, meaning it's possible to land a critical hit that does less damage than a regular hit.
See Bulbapedia's breakdown of the calculation for more info.