The Bible is God talking. He dictated the various books to prophets who acted as scribes or secretaries and wrote it all down.
It would pay for people to know about the Doctrine of the Inerrancy of Scripture...
See the following for simply a statement on it, and a sort of explanation as to what it means.
And to get into the subject matter itself, as a study, there are ample materials out there, and especially in Seminary Libraries, and/or on the Internet, if one wants to look into it. :-)
AMEN! AMEN! AMEN!