The Bible was written over a period of two thousand years by multiple authors from different cultures, writing in three different languages (Hebrew, Aramaic, and Greek). Despite such variety among the Bible’s human authors, there is complete internal consistency among the different books of the Bible. This is testimony to the fact that God Himself oversaw the writing of the Bible so that the Bible can trusted as the perfect and infallible Word of God, even while it is also a product of human authorship (John 14:26, 1 Timothy 3:16, 2 Peter 1:19-21, Hebrews 4:12.)
Ultimately, we can say that God wrote the Bible since it is His revelation of Himself to us and He has preserved it so we would know the truth (2 Peter 1:3). As regards human authorship, the majority of the books indicate who wrote them. For example, Moses wrote the first five books of the Bible (Deuteronomy 31:24-26), Isaiah wrote the book of Isaiah (Isaiah 1:1), and the Apostle Paul wrote many letters of the New Testament (Romans 1:1, 1 Corinthians 1:1, 2 Corinthians 1:1, Ephesians 1:1).
The gospel of John
Other books of the Bible don’t state directly who the author was, but the identity of the author can be deduced from evidence within the book, and from other parts of the Bible. For example, the author of the Gospel of John identifies himself as the disciple whom Jesus loved (John 13:23; 21:20). We know from the Gospel of John and the other gospels (Matthew, Mark, and Luke) that Peter, James, and John were the three disciples to whom Jesus was the closest. From this fact, and from comparing the Gospel of John with John’s letters, and the book of Revelation, we can be certain that the Apostle John wrote the Gospel of John.
The book of Hebrews
For other books of the Bible, it is uncertain who wrote them. Various Bible scholars have theories about who wrote the book of Hebrews, for example, but there is no hard evidence that identifies a particular author. However, both for books with clearly identified authors and those without them, we have the testimony of God’s church from ancient times that the 66 books that we have today are certainly part of the Bible, and have always been part of the Scriptures (namely, the Bible) that God has given to His church. Therefore, we can believe with confidence that the Bible is God’s Word even when we don’t know the author of a particular book because God has affirmed through His church that this is His Word for us.