means that
someone understands the realities of a situation and can distinguish what is important from what is not.
Imagine a case where to have a lot of experience and be able to judge people and situations well.; then “To know what’s what” fits well.