In addition to speaking to us in audible words, God can also communicate to us inaudibly, implanting his words into our minds through the work of the Holy Spirit. Sometimes it’s instructions to do something, as with Phillip in the desert and Peter at Antioch.
In other instances he reveals words for people to tell others. For example, God directed Peter what to say when questioned by the religious leaders. He gave wisdom to Stephen, revealed the future to Agabus about a famine, and directed Paul as he spoke to Elymas.
Other times God’s messages can be private communication, such as God revealing to Paul what awaited him in Jerusalem.
This is all through the work of the Holy Spirit, who directs all who follow Jesus.