When someone asks, “How was the Bible written?” they are asking a question about, what theologians call, the inspiration of Scripture.
Systematic theologian Millard Erickson outlines five theories of inspiration:
- Intuition theory, that inspiration refers to a high degree of spiritual insight.
- Illumination theory, that inspiration refers to a heightening of one’s normal powers.
- Dynamic theory, that inspiration involves a combination of divine and human interaction in the process of inspiration and writing.
- Verbal theory, that the Holy Spirit’s influence extends beyond the direction of thoughts to the selection of words used to convey the message.
- Dictation theory, that God actually dictated the Bible to the writers. 
Two passages of scripture are the foundation for my view of the inspiration of the Scripture—2 Timothy 3:16, 2 Peter 1:19-21. Both passages elucidate a truth that is found throughout scripture—the message contained in the Bible has its origin with God. These passages teach that verse that are not attributed directly to God, were inspired (or guided) by God.
Much of the Old Testament is marked as the direct speech of God—“The LORD said to…” There is no question that those, along with the passages in the New Testament attributed to Christ, were dictated by them.
The other sections/writings are typically the ones that people ask about when it comes to inspiration. Again, the passages above point to how these books were written— “all Scripture is inspired by God,” and “men spoke from God as they were carried along by the Holy Spirit.”
Jesus says in John 16:13 that, “When the Spirit of truth comes, he will guide you into all the truth. For he will not speak on his own, but he will speak whatever he hears. He will also declare to you what is to come.” He also encourages his disciples before he leaves by saying, “I have spoken these things to you while I remain with you. But the Counselor, the Holy Spirit, whom the Father will send in my name, will teach you all things and remind you of everything I have told you” (John 14:25-26).
This would indicate a view of inspiration, in which, the Holy Spirit guided the thoughts (and occasionally the very words) of the writers. The personality and vocabulary of the writers were not taken out of the process—they were not merely funnels of the dictation of God (except for those places where He speaks directly). Instead, God inspired the writers to write certain truths in a certain way—working through the writer’s personality and vocabulary—to transmit a message to His people that didn’t compromise the man writing or the message written.
 Millard J. Erickson, Christian Theology, Baker Academic, 1990, 206-7.