Input (grade 13): 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.
Output (grade 11): The slang phrase "to teach someone a lesson", means to punish or scold a person for a mistake they have made making sure that he does not make the same mistake again.