In the sport of golf, a penalty or penalty stroke is an additional stroke or strokes added to a player's score for an infraction of the rules. In match play, rather than adding strokes, the usual penalty is loss of the hole except for penalties assessed for relief from a hazard or a lost ball.
Situations in which a penalty may be assessed include, but are not limited to:
- Declaring your ball unplayable in its current location. This technically violates one of the primary rules - "Play the ball as it lies", but the rules provide for relief when a ball is in a position where the player does not wish to attempt to play it. Examples include when the ball lies among tree roots or rocks ("between a rock and a hard place"), underneath shrubbery, etc. and attempting to play it would result in damage to the club or the course. A substitute ball is dropped or placed at a penalty of one stroke.
- Hitting the ball into a situation where it cannot be played as it lies even if the player wishes it, such as into a water hazard (players are allowed to play the ball out of a water hazard without penalty, but it is rarely practical unless the hazard is only a few inches deep), out-of-bounds, or into an area where it becomes lost. A substitute ball is then played at a one-stroke penalty.
- Hitting the wrong ball, which is any ball other than the ball hit from the tee by that player, or dropped or placed as a substitute or provisional ball. Examples of a wrong ball are another player's ball or an abandoned ball. This is a two-stroke penalty.
- Picking up your ball, except under certain circumstances such as for identification, to determine if it is cut, split or otherwise unfit for play, to clear the path of another player's ball on the putting green, or to clear loose debris such as leaves or twigs from under or around it. 
- Picking up anyone else's ball, except for identification when the location of the ball in question or another in play is uncertain.
- Interfering with a moving ball; the ball must come to rest completely before it can be addressed again by the player, and players may not deflect or stop a ball in motion by any means. Players who deliberately interfere with any moving ball receive a two-stroke penalty. Incidental, unavoidable contact is generally not penalized, and additional rules determine how the ball must be played (generally as it lies).
- Playing a ball out-of-turn or while someone else's ball is in motion. After teeing off, players must play their balls in the order of their distance from the hole. Playing out-of-turn is a one-stroke penalty. The only exception is while on the putting green, when a fellow player's ball obstructs the current player's and the current player wishes the other player to play it rather than lift and mark it.
- Cleaning a ball while it is in play, except when the ball is on the green, for identification, or to determine if the ball is unfit for play (a ball is not unfit simply because it is dirty; however a cut or split may be hidden by dirt).
- Equipment violations such as too many clubs (more than 14) in a player's bag or using a ball or club of illegal design. Illegal balls include balls of improper size or weight (less than 1.68" or more than 1.62oz), floating balls, balls with dimples of the wrong size or depth, and "novelty" balls such as exploding or disintegrating balls. In the case of an illegal ball, the player adds two strokes for every hole on which that ball was put in play. Illegal clubs include clubs with a clubhead greater than 460cc, clubs with a concave face, shaft lengths over 48", grips with waisting, bulges or dis-symmetry, etc. In the case of a violation regarding clubs, the player adds two strokes for every hole of the current round played before the violation was discovered. 
When a penalty is incurred because the ball has been lost or hit into an unplayable area, the player plays a new ball or moves the current one according to the rules governing the situation in which the substitution or placement occurs. This may be from the spot at which they hit the ball into that position (a stroke and distance penalty), a playable point directly in line with the hole and behind its current position, or in some circumstances at a point two clublengths or less and no closer to the hole from which the ball crossed the boundary of the unplayable condition. If the player elects to move an unplayable ball in a sand trap, the ball must remain in the hazard.
The penalty stroke assessed is not the stroke made on the new ball; it is counted in addition to any and all swings made at the ball. For instance, hitting a ball into a water hazard, dropping a new ball at the position from which you hit the last one, then hitting the new ball counts as three strokes, not two.
However, under certain circumstances during informal games, especially involving novice players, the penalty stroke is not counted; the player simply drops a ball at the spot of the last hit and plays again. This is an unmitigated violation of several rules of the game which would normally call for disqualification from sanctioned play, but can help make the game more enjoyable in a friendly setting as well as increasing the pace, as it reduces searching for a ball and playing from extremely disadvantageous lies. When an errant shot is re-played from the same spot, it is called a mulligan and neither the first shot nor the penalty stroke is counted.