We are not told the answer to the question but here are some other instances of what may have happened.
- Acts 18:9 - One night the Lord spoke to Paul in a vision: “Do not be afraid; keep on speaking; do not be silent.
- Acts 23:11 - The following night the Lord stood near Paul and said, “Take courage! As you have testified about Me in Jerusalem, so also you must testify in Rome.”
- Acts 22:17, 18 - Later, when I had returned to Jerusalem and was praying at the temple, I fell into a trance and saw the Lord saying to me, ‘Hurry! Leave Jerusalem quickly, because the people here will not accept your testimony about Me.’
- Acts 16:9, 10 - During the night Paul had a vision of a man of Macedonia standing and begging him, “Come over to Macedonia and help us.” 10 After Paul had seen the vision, we got ready at once to leave for Macedonia, concluding that God had called us to preach the gospel to them.
- 2 Tim 4:17 - But the Lord stood by me and strengthened me, so that through me the message would be fully proclaimed, and all the Gentiles would hear it. So I was delivered from the mouth of the lion.
- Acts 27:23 - For just last night an angel of God, whose I am and whom I serve, stood beside me
- Acts 12:7 - Suddenly an angel of the Lord appeared and a light shone in the cell. He tapped Peter on the side and woke him up, saying, “Get up quickly.” And the chains fell off his wrists.
- Acts 9:3-6 - As Saul drew near to Damascus on his journey, suddenly a light from heaven flashed around him. He fell to the ground and heard a voice say to him, “Saul, Saul, why do you persecute Me?” “Who are You, Lord?” Saul asked. “I am Jesus, whom you are persecuting,” He replied.a “Now get up and go into the city, and you will be told what you must do.”
- 2 Cor 12:1 - I must go on boasting. Although there is nothing to gain, I will go on to visions and revelations from the Lord.
Thus, God used a number of methods to deliver messages to the NT prophets. In the case of Acts 16:6-8, the Holy Spirit employed one or more of the variety of methods to communicate to Paul, either a vision, a scene, a trance, or an inspired word, or something else.