From the Catechism:
109 In Sacred Scripture, God speaks to man in a human way. To interpret Scripture correctly, the reader must be attentive to what the human authors truly wanted to affirm, and to what God wanted to reveal to us by their words.
110 In order to discover the sacred authors’ intention, the reader must take into account the conditions of their time and culture, the literary genres in use at that time, and the modes of feeling, speaking and narrating then current. “For the fact is that truth is differently presented and expressed in the various types of historical writing, in prophetical and poetical texts, and in other forms of literary expression.”
111 But since Sacred Scripture is inspired, there is another and no less important principle of correct interpretation, without which Scripture would remain a dead letter. “Sacred Scripture must be read and interpreted in the light of the same Spirit by whom it was written.”
The Second Vatican Council indicates three criteria for interpreting Scripture in accordance with the Spirit who inspired it.
112 1. Be especially attentive “to the content and unity of the whole Scripture”. Different as the books which compose it may be, Scripture is a unity by reason of the unity of God’s plan, of which Christ Jesus is the center and heart, open since his Passover.
The phrase “heart of Christ” can refer to Sacred Scripture, which makes known his heart, closed before the Passion, as the Scripture was obscure. But the Scripture has been opened since the Passion; since those who from then on have understood it, consider and discern in what way the prophecies must be interpreted.
113 2. Read the Scripture within “the living Tradition of the whole Church”. According to a saying of the Fathers, Sacred Scripture is written principally in the Church’s heart rather than in documents and records, for the Church carries in her Tradition the living memorial of God’s Word, and it is the Holy Spirit who gives her the spiritual interpretation of the Scripture (". . . according to the spiritual meaning which the Spirit grants to the Church").
114 3. Be attentive to the analogy of faith. By “analogy of faith” we mean the coherence of the truths of faith among themselves and within the whole plan of Revelation.
119 “It is the task of exegetes to work, according to these rules, towards a better understanding and explanation of the meaning of Sacred Scripture in order that their research may help the Church to form a firmer judgement. For, of course, all that has been said about the manner of interpreting Scripture is ultimately subject to the judgement of the Church which exercises the divinely conferred commission and ministry of watching over and interpreting the Word of God.”