It depends on the intent of the particular biblical author. If he intended what he wrote to be taken literally, then we should take it literally. If he meant for it to be taken symbolically, then that's how we should take it. Although this principle is easy to state, it isn't always easy to apply.
Some things in the Bible, such as the parables of Jesus, are clearly symbolic, but what about other things, such as Christ's words about the Eucharist? Are they to be taken literally or symbolically? Catholics, Eastern Orthodox, many Lutherans, and many Anglicans take them literally. Evangelicals, Fundamentalists, and other Protestants do not.
Yet all Christians claim Christ's words, as well as the tenor of the New Testament, support their belief, and all claim to know what Christ intended when he spoke them. How do we decide who's right?
Based on literary and historical analysis, scholars often can determine how the biblical writer wanted his words to be understood. This is why in studying Scripture we should familiarize ourselves with its literary and historical background.
Still, scholarship alone can't solve all of our interpretative problems. There are scholars, for instance, who affirm the Real Presence of Christ in the Eucharist and those who deny it, just as there are those who think the New Testament teaches distinctively Catholic beliefs and those who don't.
Because of the possibility (and frequency) of such scholarly impasses, the Catholic Church insists that Christ established the magisterium--the teaching authority of the Church--to propound biblical truth infallibly. The authentic explanation of the biblical message has been left neither to our own meager interpretive abilities, nor to the greater, yet still finite, exegetical skills of scholars, but has been safeguarded by God himself.