What is coming from the prophet's mouth? Something false. Who is this prophet speaking for, what supernatural spirit? It is not the spirit of God, but a demon speaking through a human being, inspiring and motivating him. God permits it and expects His people to put that person to the test. God expects us to be able to discern the spirit that is motivating the speaker. The test is to see whether we will remain loyal to God—loyal in terms of keeping His commandments.
Thus, the listener better have a good working knowledge of God, which returns us to II Corinthians 10:5, where Paul warns that reasonings will exalt themselves against the knowledge of God. This clarifies the devices that Satan will use to turn us aside. This also underlines our need to be able to thwart those devices. We need to have a good working knowledge of God—not things about God so much, but the knowledge of God the Person, the Being with whom we have a relationship.
Also, Deuteronomy 13 confirms that some of these false prophets will be able to do miracles, which Paul confirms in II Thessalonians 2, and John confirms in Revelation 11. What is in the New Testament is built upon what God has already shown in the Old Testament—that Satan's modus operandi will be carried through from one covenant to the other. We have to understand that such signs—the ability to do miracles—are not of themselves indications of authority from God. They must be combined with teaching that agrees with God's already revealed will.