quoting from the MLB rulebook (posted on yahoo and mlb):
Credit a pitcher with a save when he meets all three of the following conditions:
(1) He is the finishing pitcher in a game won by his club; and
(2) He is not the winning pitcher; and
(3) He qualifies under one of the following conditions:
(a) He enters the game with a lead of no more than three runs and pitches for at least one inning; or
(b) He enters the game, regardless of the count, with the potential tying run either on base, or at bat, or on deck (that is, the potential tying run is either already on base or is one of the first two batsmen he faces); or
(c) He pitches effectively for at least three innings. No more than one save may be credited in each game.
A pitcher who records the final out for the winning team WILL NOT be credited with a save in the following situations:
(1) He enters the game in the final inning with a 3-run lead and nobody on base, but does not complete a full inning. Under these conditions, a pitcher must complete one full inning to earn a save.
(2) A pitcher cannot create his own save situation. For example, if a pitcher enters the game in the final inning with a 5-0 lead and nobody on base, he will not earn a save by allowing four runs before recording the final out.
(3) Pitching the final inning for the winning team does not guarantee a save. Please refer to conditions a, b and c above when determining if a pitcher entered the game under save conditions.