In golf, golfers hit a lot of shots they wish they could have back. Some are particularly bad.
When golfers hit shots they think are so bad that they're not going to find them again, they start to worry. Will they have to take a penalty stroke? Is their ball in the water? Is it another hazard (nowadays called a penalty area)? Will it be out of bounds?
Fortunately, golfers don't have to find out the hard way and then evaluate what they do next. They have the option of hitting a provisional ball.
What is a provisional in golf?
A provisional ball is played by a player when they have reason to believe the ball they just hit is lost or will not be able to be played from a penalty area (hazard). A provisional cannot be called just to try another shot again, but rather it is designed to save time and not force a golfer to return to where they had just played a shot if a stroke-and-distance penalty is called.
There is no situation in which a player can replay a shot in golf without incurring a penalty except when a player declares a provisional ball.
The option to hit a provisional exists as a pace-of-play measure. This way, a player can replay a shot under the assumption that the provisional will count as their next shot after a penalty stroke is applied without having to find the ball (or not) and then come back to the position of the last shot and hit again.
If a player is able to find and play their original shot before the provisional, then the player's provisional shot doesn't count and the player can pocket the ball or put it back in their bag without it mattering to their score.