If you say, “The cat's out of the bag” instead of “The secret is given away,” you're using an idiom. The meaning of an idiom is different from the actual meaning of the words used. “An apple a day keeps the doctor away” is a proverb. Proverbs are old but familiar sayings that usually give advice.