An idiom is a phrase or group of words with a meaning that is not obvious from the individual words (for example, "rain cats and dogs", meaning "rain heavily"). Even if you know all the words (rain, cat, dog), you will probably not understand "rain cats and dogs" if you don't know the idiom. "Rain cats and dogs" is not a saying because it does not express a general truth.
A saying is a short expression that expresses a general truth and contains advice or wisdom (for example, "once bitten, twice shy", meaning that an unpleasant experience makes us more careful the next time). If you know the words (once, bite, twice, shy) you can probably understand what this saying means. "Once bitten, twice shy" is not an idiom because it is understandable from the individual words.