"GREGORY says (Moral. xx, 1): "Holy Writ by the manner of its speech transcends every science, because in one and the same sentence, while it describes a fact, it reveals a mystery."
"The author of Holy Writ is God, in whose power it is to signify His meaning, not by words only (as man also can do), but also by things themselves. So, whereas in every other science things are signified by words, this science has the property, that the things signified by the words have themselves also a signification. Therefore that first signification whereby words signify things belongs to the first sense, the historical or literal. That signification whereby things signified by words have themselves also a signification is called the spiritual sense, which is based on the literal, and presupposes it. Now this spiritual sense has a threefold division. For as the Apostle says (Heb 10:1) the Old Law is a figure of the New Law, and Dionysius says (Coel. Hier. i) "the New Law itself is a figure of future glory." Again, in the New Law, whatever our Head has done is a type of what we ought to do. Therefore, so far as the things of the Old Law signify the things of the New Law, there is the allegorical sense; so far as the things done in Christ, or so far as the things which signify Christ, are types of what we ought to do, there is the moral sense. But so far as they signify what relates to eternal glory, there is the anagogical sense. Since the literal sense is that which the author intends, and since the author of Holy Writ is God, Who by one act comprehends all things by His intellect, it is not unfitting, as Augustine says (Confess. xii), if, even according to the literal sense, one word in Holy Writ should have several senses."
~St. Thomas Aquinas: Summa Theologica I, q. 1, a. 10.