If a player gets their 2nd courtesy warning, they get a stroke added to their score for the hole in which the violation occurs. Thus the violation could cost them the hole and match. Overall scores in match play are used for overall match tie-breakers.
Where does it say that?
801.04
G. A player violating a courtesy rule may be warned by any affected player, even if from another group, or by an official. The player shall be assessed one penalty throw for each subsequent courtesy violation of any type in the same round...
G. A player violating a courtesy rule may be warned by any affected player, even if from another group, or by an official. The player shall be assessed one penalty throw for each subsequent courtesy violation of any type in the same round...
If I'm walking between holes and get called for my second courtesy violation of the round (say I shout an obscenity at a player on another hole as I walk by and my group calls me on it), what hole do I assign the penalty to? The previous hole or the next hole? If it's match play, do I change the outcome of the previous hole by adding a throw to my score there or do I start the next hole with a one throw handicap (basically throwing 2 from the tee)?
A courtesy penalty is no different than a scoring penalty. It doesn't apply to a specific hole, it applies to the total score.