The Bible is not one "book," it is a "library" of sixty-six books that were written over a period of more than a 1,500 years by many different authors. These authors were "inspired" in their thinking and writing by the Holy Spirit. Thus the Bible is the inspired Word of God without error. It also has the human "touch" from its authors. Paul is different than David, who is different than James or Moses. Not all classifications are alike. Below are some of the main genres.
Law is "God's law," they are the expressions of His sovereign will and character. The writings of Moses contain a lot of Law. God provided the Jews with many laws (619 or so). These laws defined the proper relationship with God to each others and the world (the alien): As well as worshipping God, governing the people, priestly duties, what to eat and not eat, how to build the temple, proper behavior, manners, and social interaction, etc. The Ten Commandments are often known as "The Law," so are Exodus, Leviticus, Numbers, and Deuteronomy. In the NT, the Sermon on the Mount is considered law and the fulfillment of the law. Paul's "calls" or precepts to the church are also law in their literature form.
Almost every OT book contains history. Some books of the Bible are grouped together and commonly referred to as the "History" (Joshua, Kings & Chronicles). These books tell us the history of the Jewish people from the time of the Judges through the Persian Empire. In the NT, Acts contains some of the history of the early church, and the Gospels also have History as Jesus' life is told as History. Even the Epistles have history as they chronicle events.
Wisdom Literature is focus on questions about the meaning of life (Job, Ecclesiastes), practical living, and common sense (Proverbs and some Psalms ). This literature contrasts our faulty human wisdom to God's reasoning perfection. Thus when we live to our own will and not His, we will experience grief and frustration, not because God is vengeful and angry but because we led ourselves that way out of our pride and arrogance. This literature warns us of our evil nature and desires.
Poetry is found mostly in the Old Testament and is similar to modern poetry. Since it is a different language, "Hebrew," the Bible's poetry can be very different, because it does not translate into English very well. Poetry that we are used to is usually based on "rhythm" or various types of sound mixings such as our music. Hebrew poetry is based on "rhythm" of stanzas and phrases re-told differently, conveying the same ideas and meaning. Some Bible books are all poetry (Psalms, Song of Songs, and Lamentations), and some Books only have a few verses such as in Luke.
Gospel means the "good news" that we received through salvation by the work and life of God's Son, Jesus Christ. When the Gospels were first written in the first century, it was a brand new form of literature. The four Gospels (Mark, Matthew, Luke, and John) contain a bit of all the literary types with the primary purpose to express faith in Christ and what He has done on our behalf. Each of the gospels present the teachings, ministry, death, and resurrection of Jesus in a distinctive way, but not contradictory for a specific audience. Matthew was written to Jews, Luke to the Greeks, both with different ways of reasoning and thinking. Think of the Gospels like the facets of a diamond, giving more depth and meaning.
Epistles refer to the 21 letters in the NT. These are the personal letters by the apostles to their churches. These letters are different and similar to the letters of their time. Most challenge the congregation to wake up out of their selfish ways and to concentrate on Christ with specific ways and clarifications. They begin with the name of the writer and the recipient, a greeting, a reason for the letter, the central message or body of the letter, and then usually a closing, just like most letters today.
Prophecy is the type of literature that is often associated with predicting the future; however, it is also God's words of "get with it" or else. Thus Prophecy also exposes sin and calls for repentance and obedience. It shows how God's law can be applied to specific problems and situations, such as the repeated warnings to the Jews before their captivity. This is found in the OT books of Isaiah through Malachi, the section of the Bible labeled "Prophecy" by both Jews and Christians. There are over 2000 predictions that have already come to pass, hundreds of years after the author's death!
Apocalyptic Writing is a more specific form of prophecy. Apocalyptic writing is a type of literature that warns us of future events which, full meaning, is hidden to us for the time being. Apocalyptic writing is almost a "secret" giving us glimpses through the use of symbols and imagery of what is to come. We may not know the meanings now, but time will flush it out. Apocalyptic writing is found in Isaiah, Daniel, Ezekiel, Zechariah, and Revelation.