In a wider sense, a lesson is an insight gained by a learner into previously unfamiliar subject-matter. Such a lesson can be either planned or accidental, enjoyable or painful. The colloquial phrase "to teach someone a lesson", means to punish or scold a person for a mistake they have made in order to ensure that they do not make the same mistake again.