They have the same basic meaning, but 'liberty' is a bit more poetic, formal and pretentious than 'freedom'. That's why you hear it less than 'freedom'.
We have many pairs and sets of words like this in English which are almost synonyms. In general, the one with the Germanic origin (in this case 'freedom') is a more everyday word, whereas the one with the Latin root (in this case 'liberty', which is similar to equivalent words in Portuguese, Spanish,French, and Italian) is the more formal or poetic-sounding one.