Excerpt about this from "The Interior Castle" by St. Teresa of Avila (1515-1582)
1. GOD arouses the soul in another manner which, though in some ways apparently a greater favour than the above mentioned, yet may prove more dangerous, therefore I will give some particulars about it. He does this by means of words addressed to the soul in many different ways; sometimes they appear to come from without; at other times from the inner depths of the soul; or again, from its superior part; while other speeches are so exterior as to be heard by the ears like a real voice.
6. Now let us return to the first point--whether these communications come from the inferior or the superior part of the soul, or from without, does not affect their originating from God.
7. In my opinion these are the most certain signs of their being divine. The first and truest is the power and authority they carry with them, for these words are operative. For example: a soul is suffering all the sorrow and disquiet I have described: the mind is darkened and dry; but it is set at peace, freed from all trouble and filled with light merely by hearing the words: 'Be not troubled.' These deliver it from all its pains, although it felt as though, if the whole world and all its theologians had united in trying to persuade it there was no cause for grief, it could not, in spite of all their efforts, have been delivered from its affliction.
8. Again, a person is troubled and greatly terrified at being told by her confessor and other people that her soul is under the influence of the evil one: she hears a single sentence which says, 'It is I, be not afraid,' 6 and is at once freed from all fears and filled with consolation; indeed, she believes it would be impossible for any one to disturb her confidence.
9. Again, when exceedingly anxious about important business, not knowing whether or not it will be successful, on hearing words bidding her 'Be at peace; all will go well,' she feels reassured and free from all care in the matter. 8 Many other instances of the same sort could be mentioned.
27. Those our Lord does not lead by this path may suppose that the soul can avoid listening to these locutions and that even if they are interior it is at least possible to distract the attention from them so as not to hear them and thus escape danger. This cannot be done: I am not speaking of freaks of fancy which may be prevented by ceasing to desire certain things or by paying no attention to its inventions. This is not feasible when these communications come from the Holy Ghost Who, when He speaks, stops all other thoughts and compels the mind to listen. Mark this: that I believe it would be easier for a person with very keen ears to avoid hearing a loud voice, for he could occupy his thoughts and mind in other things. Not so here; the soul can do nothing, nor has it ears to stop, nor power to think of aught but what is said to it. For He Who could stay the sun on its course (at the prayer of Josue, I believe) can so quiet the faculties and the interior of the spirit as to make it perceive that another and a stronger Lord than itself governs this castle; it is thus affected with profound devotion and humility, seeing that it cannot but listen. May the divine Majesty vouchsafe that, forgetting ourselves, our only aim may be to please Him, as I said.