God has communicated with man in many different ways. Men like Joseph of the Old Testament were spoken to through dreams. Daniel also had dreams from God. Men like Isaiah and Ezekiel had visions from the Lord. Normally in the Old Testament, God spoke to people through His prophets and the preachers of those days.
But today in New Testament times, God speaks mainly through His Word the Bible and sometimes through dreams and visions. Hebrews 1:1-2 tells us that God spoke in many different ways in the Old Testament but has in these last days spoken to us by His Son, who is called in the Bible, THE WORD OF GOD. (Read John 1:1 and Revelations 19:13). God’s major way of speaking to His children is through the Bible though sometimes He chooses to speak through dreams and visions.
God used some 40 men over several hundreds of years to record His word. God supervised this writing through these men of God. Even though men are not perfect, God did not allow these men to make errors when recording His word for the generations to follow. The Holy Spirit directed these men. It was not just their ideas and thoughts. 2 Peter l: 21 says, “For the prophecy came not in old time by the will of man: but holy men of God spoke as they were moved by the Holy Ghost”. 2 Timothy 3:16-17 says, “All scripture is given by inspiration of God, and is profitable for doctrine, for reproof, for correction, for instruction in righteousness”. Every word and every thought in the Bible is put there and approved by God Himself.
God has preserved His Word down through the years so we could have it to live by. The critics have tried to destroy it, but have failed. Matthew 24:35 says it will always stand never to be done away with. God is the author of the Bible and He has given it to us.