Acts 13:12 KJV
Then the deputy, when he saw what was done, believed, being astonished at the doctrine of the Lord.
Paul had preached and, being filled with the Holy Ghost, rebuked the man.
It was after this that the deputy "believed, being astonished at doctrine of the Lord."
The word doctrine means teaching or instruction. Gill says,
"...There are many astonishing things in the doctrine of faith; as the birth of Christ of a virgin; the union of the two natures, divine and human, in his person; salvation through his crucifixion and death, and the resurrection of the dead..."
What Paul had taught was the error of sorcery and the power of God over this evil and it had been backed with a "mist and darkness" falling upon the one practicing it.
Our doctrine and teaching is not meant to always be uplifting and encouraging. It is meant to confront evil and all that is opposed to God. When it is preached in that manner, men will believe, but not because of that tactics of man, they will believe because of the doctrine of the Lord.