Firstly, let me say that I do not want this thread to become a debate about whether there are still prophets or the gift of prophecy is still operational/relevant today. This is addressed to those who do believe in the gift of prophecy, in the hope of avoiding some areas of danger.
We need to understand that just because a message begins with "Thus saith the Lord ...," or because it is presented as God speaking in the first person, does not necessarily mean that it IS from the Lord, or that it is true prophecy. We also need to be able to discern the source of the words that we receive ourselves.
A "word" of this kind has three possible sources: the Lord, the devil, or the human mind (our own or that of the person speaking.) We need to be able to tell the difference between the three, and the following 8 tests will help you to do that.
1. Does it line up with Scripture?
If it is true prophecy, then it is inspired by the same Holy Spirit who wrote the Bible. He does not change; He does not say one thing in the Word and something different through modern prophecy. Many years ago I knew a lady who was "in love" with a married man. Quite regularly, she would get "prophetic words" saying that he was going to leave his wife and marry her. Were they from God? Most definitely not - the source was her own heart.
I also sometimes hear people quote something from Scripture in a "prophecy," but the quote is incorrect. Now, it is possible for me or any other preacher to make a mistake and say "Samson" when we meant "Solomon." It is not possible for God to do so. If the Scripture in the prophecy is incorrect, then it is a word from the mind of man, not from the Spirit of God.
2. Does it line up with the Character of God?
Sometimes, a "prophecy" will appear to line up with the letter of the Word, yet it does not reflect the character of God. Often, "judgmental" prophecies come into this area. Now don't get me wrong, God is a God of judgment as well as a God of love. But when He has to bring judgment, particularly when He has to bring it against His own people, it grieves Him. An "off with their heads!" prophecy that seems to take delight in the judgment does not reflect His character.
Another instance is the prophet who walks into a church and, in an effort to big-note himself, sets about exposing every sin in the place. Again, God will certainly expose sin when the sinner is unrepentant and hard hearted; but He will not do so if the person is struggling, trying to gain victory over a particular problem, but for the moment at least losing the battle. In that case, the principle that "love covers a multitude of sins" cuts in.
3. Does it strike a chord with your own spirit?
There is one great difference between prophecy in the Old Testament and prophecy in the New. In the Old Testament, the people did not have the Spirit of God within them. Their only way of knowing what God was saying was through externals: the written Law, and the words of the prophets. This side of the Cross, every born-again believer has the Spirit of God within. We are supposed to receive our leading from Him. Anything that is spoken to us by a prophet should be either a confirmation of what God has already spoken to our own spirit by His Spirit, or a preparation for what He is going to speak. In my experience, even when a prophecy is a rebuke, if it is truly from the Lord the hearer will recognize it as such (even if he doesn't want to know about it and refuses to respond.)
4. Is it true?
This one should be a no-brainer. God is truth. The devil is a liar. If it is not true, the source should be glaringly obvious. Yet somehow, the prefixing of a statement with those four magical words, "Thus saith the Lord ..." can at times cause us to think that what we know to be untrue must in fact be true. Example: some time ago, someone attacked the ministry I lead with a false prophecy saying that God wanted it closed. One of the accusations in that word was that we were just operating out of our own thoughts, not seeking Him. Now, the truth is that we constantly seek the Lord for the direction for this ministry. The word was a lie, and because I understand these principles I was easily able to dismiss it as such. (There were also a number of other factors that showed it up as a false prophecy.) However, if I hadn't understood these principles, it would have been very easy for me to "repent" of something that wasn't even true, and close a ministry that God wants to remain active.
5. Does it have spiritual significance?
This is one of the great differences between prophecy and psychic powers. The devil will show you things just to satisfy your curiosity, or to make you look good (which makes him look good.) God does not do that. He will tell you only the things you need to know, either to make changes in your own life, to encourage change in the lives of others, or for intercession. I was horrified some years ago to hear of "prophets" who would call people out and say things like, "Oh, I can see your living room. You have this and that and something else" (describing the furniture and furnishings.) What is the spiritual value in that? I'm sure the person already knows what is in his/her living room. The only benefit can be to make the "prophet" look good. There is only one time when God would be likely to tell you what is in your house - if something there is wrong in His eyes, and He wants you to get rid of it.
6. If a time frame is given, does it come to pass within that time frame?
Not all prophecies specify a time frame. Many prophecies of the Bible have not yet come to pass, but that does not mean that they are false prophecies: their fulfillment is still some time in the future. However, if a time frame is given, and it doesn't happen within that time frame, then it is not God. Twenty-five years ago some bright spark gave us "88 Reasons Why Jesus Will Return in 1988" (Yes, there was actually a book with that title.) Guess what? Jesus did not return in 1988. 88 reasons why He would still did not make it a true prophecy. At a smaller level, if someone prophecies that God is going to do something today/this month/this year, and at 12.01 tomorrow morning, or 1st next month, or 1st January next year, that thing has not happened, then that was not a word from God.
7. Where is it taking us?
Deuteronomy 13:1 says that if a prophet comes, and what he says comes to pass, then he says, "Let's go worship other gods," the people are not to follow that prophet, because he is not of God. A prophetic word may seem to pass all the other tests, but if following it will lead you away from the Lord, then it is not God.
8. What spirit is behind it?
In Acts 16:16-18 we have the story of a slave girl who followed Paul and his group, crying out "These men are servants of the Most High God, who proclaim to you the way of salvation." At first glance, that "prophecy" seems to meet all the tests here, yet Paul recognized that the source was demonic and cast the spirit out of the girl, to the great consternation of her minders. Why did it matter? Very simply, if this girl had been allowed to continue unchecked she would have gained acceptance as a prophet, which would have made the young Christians more open to receive future words from her ... words which would have brought the message of satan, not of God. Further, she would have been lifted up, with the glory going to her, and the focus being shifted from the vital message of salvation being brought by the apostles.
Whilst it is important for us to test prophecy, it is also important for us to ask the Lord for the gift of discerning of spirits, so that we can be aware of the deception that may lie behind what otherwise looks like a genuine word from God.