We use this expression when someone learns something from unpleasant experiences or bad mistakes. Instead of being told what to do, they only understand the lesson after something goes wrong.
You can use this phrase in ………… language.
Spoken
Informal
Example
A: I didn’t set an alarm and missed my exam.
B: Ouch… well, you definitely learned that one the hard way.