The Books of Proverbs is all about learning, making mistakes, receiving correction and gaining in wisdom. We often think of Proverbs as concerned primarily with passing down principles of good living from one generation to another, such as the principles of diligence, faithfulness, prudence. Often overlooked, however, is that Proverbs is also concerned with what we might call relational learning. For the Book of Proverbs, some of life's most valuable life lessons come in the context of relationships.
The verse cited above is a case in point. It says, "Strike a scoffer and the simple will gain prudence; correct a person of understanding and s/he will gain in understanding knowledge." Another verse (21:11) is very similar: "When the scoffer is punished, the simple gains wisdom; when the wise is instructed, s/he receives more knowledge."
The language is dense, but if we look only at first half of the verse we have: a) the scoffer; b) punishment of the scoffer; c) the simple; d) the gain of benefit for the simple. Proverbs divides the world into several kinds of people, but the main categories are the wise, foolish, scoffers and simple. A scoffer is what we today might call a "know-it-all" -- i.e., a person who has seen everything and has a definitive answer for questions asked and even unasked. Proverbs has little hope that they will reform.
But if one disciplines or punishes such a person, we are told that the effect is not on the scoffer him/herself but on the onlookers - the "simple". A "simple" person for Proverbs is a person, regardless of age, who has the potential of going either towards wisdom or foolishness. We might call him/her "naive" or "unschooled." Such a person is in a vulnerable position because s/he is very susceptible to the pressure of others.
Yet in this passage we are told that the effect of actual discipline on the scoffer is that the simple will learn prudence - which is the first step in wisdom. The value of seeing a scoffer corrected or disciplined may seem to be minimal, until we realize that the one witnessing this correction is a person who may very well take to heart the importance of the lesson being taught.
People make mistakes and are disciplined for them all the time. One of the measures of prudence, according to Proverbs, is ability to learn from the mistakes of others. For the Book of Proverbs, there is a great deal of power not only in a good example, but also in a bad example.