It can happen when trying to get the ball out of heavy rough or out of a difficult lie in a bunker. You make a stroke at the ball but clip the ball again with the club on the follow through. It can also happen on the green with a very short putt. Thinking that you only have to tap the ball into the hole you make a stroke with the putter but barely set the ball in motion and touch the ball again with the club as you follow through. If you hear the dreaded double click tell your marker in stroke play or your opponent in match play. The penalty in both is one shot. You only made one stroke at the ball and there is a penalty of one shot for striking the ball more than once, making two strokes in all.
Rule 14-4 Striking the ball more than once