I'm glad they got caught. That will 'teach them a lesson'! [=they will learn that they should not do that again]
We 'learned our lesson' the hard way. [=we learned from an unpleasant experience]
They studied the 'lessons' [='teachings'] of the great philosophers.
(..) Me? Tsk. God. Oh, Christ. Mom. No, I'm glad because, uh... because you're old enough now to learn the most important lesson in life: You cannot count on anyone except yourself. You cannot count on anyone except yourself. You know, it's sad but true, (..)1999 American Beauty