During the second round of the Farmers Insurance Open the Canadian Mackenzie Hughes hit a wrong ball. He was penalized 2 strokes and he had to find his original ball and correct the breach. When a player hits a wrong ball, he must always correct the breach by playing the right ball or go back to the previous spot where he made his last stroke and play Stroke and Distance.
https://golf.com/instruction/rules/bizarre-wrong-ball-tour-pro-home/
Wrong place
Sometimes players are confused between a wrong place and a wrong ball. Playing from a wrong place is a penalty of two strokes but the player does not always have to correct the breach. Here are a few examples:
Penalty area
The player takes a lateral relief for a ball in a penalty area. Instead of dropping a ball inside 2 club-lengths from the point of entry, he drops a ball at 3 club-lengths. If he plays the ball, it will be a penalty of 2 strokes for playing from the wrong place and the player continues play with that ball
Cart Path (immovable obstruction)
The free relief must be inside one club length from a determined point. A drop at 2 club length is a wrong place, penalty of 2 strokes, but you continue play.
Causing your ball to move
During the search of your ball, you accidently move it a few inches. It is not a penalty, and you must replace the ball. If you forget to replace the ball, it will be a 2-stroke penalty for playing from the wrong place and you continue with that ball.
Marking the ball on the green
Sometimes, we move the ball marker a few inches to give a free line of putt to another player. If we make a putt without moving the marker or ball back in its original spot, we will play from a wrong place and we add a 2-stroke penalty
Serious breach
When, the wrong place gives you a significant advantage, you must correct by playing from the right place. As an example, you hit the ball over a yellow penalty area, and you take relief on the green side.