Original: 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.
Simplified: 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.