From BR Bullpen
A strikeout (aka, K, punch out, caught looking) is recorded when there are three strikes against the batter. If the catcher catches the third strike, the third strike is the result of a foul bunt, or first base is occupied and there are less than two outs, the batter is out and the catcher is credited with a putout. If the catcher fails to catch the third strike while first base is unoccupied and/or there are two out, the batter becomes a runner just as if he had hit a ground ball.
In either case, the pitcher is credited with a strikeout, but does not receive credit for an assist. If the third strike is not caught and the batter reaches first base safely, the official scorer rules whether the failure to catch the third strike was caused by the pitcher, in which case it is ruled a strikeout and wild pitch, or by the catcher, in which case it is rule a strikeout and passed ball. An error is only charged if the catcher or another fielder makes an additional misplay, such as an errant throw or muffed catch, in allowing the batter to reach base.
Because a pitcher can receive credit for a strikeout even when the batter reaches base safely, it's possible for him to strike out more than three batters in one inning. It's theoretically possible to record an arbitrary number of strikeouts in an inning, but the major league record is 4. The record is shared by about 50 different pitchers. Chuck Finley is the only pitcher in MLB history to record 4 strikeouts in an inning more than once, and he managed the feat 3 times.