'le' is usually used at the end of a sentence or following a verb, which mostly means 'something has happened'. It does not have an actual meaning.
'liao' is usually used as part of a word, which usually means 'know' or 'end something'. 了结 了解 了断
As you can see from the comment of someone above, there are some exceptions. I think you can figure it out later.