to obtain knowledge or understanding through experience
We'd never done anything like this, so we learned how to build a house the hard way. Since he won't take advice from anyone, I guess he is going to have to learn the hard way. Usage notes: often used in the form find (something) out the hard way: He found out the hard way that he needed help.