What is the meaning of [experience is the teacher of fools]

It is foolish to learn—or to expect other people to learn—solely by making mistakes; also used with the implication that wise people learn from others’ mistakes rather than their own.