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.
(..) On the one hand, you can sugarcoat it. The way they do in movies and romance novels... where beautiful people learn beautiful lessons... where nothing is too messed up that can't be fixed... with an apology and a Peter Gabriel song. I like that version as much (..)2014 The Fault in Our Stars