What Is よかった (Yokatta) In Japanese? How Do Native Speaker Use It?

What Is よかった (Yokatta) In Japanese? How Do Native Speaker Use It?