The Rambam writes in the Moreh [expanded upon here BS"D!]
Having spoken of similes, I proceed to make the following remark:--The key to the understanding and to the full comprehension of all that the Prophets have said is found in the knowledge of the figures, their general ideas, and the meaning of each word they contain. You know the verse:
"I have also spoken in similes by the Prophets" (Hosea xii. 10); and also the verse, "Put forth a riddle and speak a parable" (Ezek. xvii. 2). And because the Prophets continually employ figures, Ezekiel said, "Does He not speak parables?" (xxi. 5). Again, Solomon begins his book of Proverbs with the words, "To understand a proverb and figurative speech, the words of the wise and their dark sayings" (Prov. i. 6); and we read in Midrash, Shir ha-shirim Rabba, i. 1); "To what were the words of the Law to be compared before the time of Solomon? To a well the waters of which are at a great depth, and though cool and fresh, yet no man could drink of them. A clever man joined cord with cord, and rope with rope, and drew up and drank. So Solomon went from figure to figure, and from subject to subject, till he obtained the true sense of the Law." So far go the words of our Sages. I do not believe that any intelligent man thinks that "the words of the Law" mentioned here as requiring the application of figures in order to be understood, can refer to the rules for building tabernacles, for preparing the lulab, or for the four kinds of trustees. What is really meant is the apprehension of profound and difficult subjects, concerning which our Sages said, "If a man loses in his house a sela, or a pearl, he can find it by lighting a taper worth only one issar. Thus the parables in themselves are of no great value, but through them the words of the holy Law are rendered intelligible." These likewise are the words of our Sages; consider well their statement, that the deeper sense of the words of the holy Law are pearls, and the literal acceptation of a figure is of no value in itself. They compare the hidden meaning included in the literal sense of the simile to a pearl lost in a dark room, which is full of furniture. It is certain that the pearl is in the room, but the man can neither see it nor know where it lies. It is just as if the pearl were no longer in his possession, for, as has been stated, it affords him no benefit whatever until he kindles a light. The same is the case with the comprehension of that which the simile represents. The wise king said, "A word fitly spoken is like apples of gold in vessels of silver" (Prov. xxv. 11). Hear the explanation of what he said:--The word maskiyoth, the Hebrew equivalent for "vessels," denotes "filigree network"--i.e., things in which there are very small apertures, such as are frequently wrought by silversmiths. They are called in Hebrew maskiyyoth (lit. "transpicuous," from the verb sakah, "he saw," a root which occurs also in the Targum of Onkelos, Gen. xxvi. 8), because the eye penetrates through them. Thus Solomon meant to say, "just as apples of gold in silver filigree with small apertures, so is a word fitly spoken."
See how beautifully the conditions of a good simile are described in this figure! It shows that in every word which has a double sense, a literal one and a figurative one, the plain meaning must be as valuable as silver, and the hidden meaning still more precious: so that the figurative meaning bears the same relation to the literal one as gold to silver. It is further necessary that the plain sense of the phrase shall give to those who consider it some notion of that which the figure represents. just as a golden apple overlaid with a network of silver, when seen at a distance, or looked at superficially, is mistaken for a silver apple, but when a keen-sighted person looks at the object well, he will find what is within, and see that the apple is gold. The same is the case with the figures employed by prophets. Taken literally, such expressions contain wisdom useful for many purposes, among others, for the amelioration of the condition of society; e.g., the Proverbs (of Solomon), and similar sayings in their literal sense. Their hidden meaning, however, is profound wisdom, conducive to the recognition of real truth.
Know that the figures employed by prophets are of two kinds: first, where every word which occurs in the simile represents a certain idea; and secondly, where the simile, as a whole, represents a general idea, but has a great many points which have no reference whatever to that idea: they are simply required to give to the simile its proper form and order, or better to conceal the idea: the simile is therefore continued as far as necessary, according to its literal sense. Consider this well.
An example of the first class of prophetic figures is to be found in Genesis:--"And, behold, a ladder set up on the earth, and the top of it reached to heaven; and, behold, the angels of God ascending and descending on it" (Gen. xxviii. 12). The word "ladder" refers to one idea: "set up on the earth" to another: "and the top of it reached to heaven" to a third: "angels of God" to a fourth: "ascending" to a fifth; "descending" to a sixth; "the Lord stood above it" (ver. 13) to a seventh. Every word in this figure introduces a fresh element into the idea represented by the figure.