The answers given above are excellent. I want to mention another aspect of belief in spiritual experience/prophecy; verification.
As in most aspects of Judaism, a healthy amount of skepticism is required. In the case of prophecy, for instance, a double measure is necessitated to prevent charismatic people from convincing the nation that they are prophets.
Mass Revelation as A Proof
One of the major 'proofs' for Judaism is that the initial prophetic insight they received at Mount Sinai was a mass event. Other major religions, such as Christianity or Islam, have a single founder who claimed prophecy, whereas ~three million Jews at Mount Sinai had the exact same experience. Even if one were to claim that someone dosed the entire nation with LSD before the supposed event, it is without doubt that each person would have a dramatically individual "trip"/hallucination, and not leave that nation-building event with a cohesive understanding and goal, nor with a commonly shared experience that would stand up to the many arguments and quarrels the famously stubborn nation had.
Additionally, the Mount Sinai revelation was supposed to have been experienced (at least in part) by the entire population of the world. Even barring a miraculous/prophetic transmission, I claim at least preliminary scientific backing for this by examining the Krakatoa eruption where the sound waves circled the earth multiple times, enabling literally the entire plane to experience the event. Nonetheless, the Mount Sinai revelation has been undisputed fact in major religions and society for thousands of years.
Testing Individual Prophets
How do we prove the veracity of prophecy that does not come via mass revelation?
Now if you say to yourself, "How will we know the word that the Lord
did not speak? If the prophet speaks in the name of the Lord, and the thing does not occur and does not come about, that is the thing the Lord did not speak. The prophet has spoken it wantonly; you shall not be afraid of him. (Devarim - Deuteronomy - Chapter 18)
Rashi writes on this verse that you must slay such a prophet, if his prophecy is proven to be incorrect. He also writes that the admonition "do not be afraid of him" means "do not be afraid to prosecute him (and kill him) because of fear that you will incur punishment".
Additionally, Rashi states in the same verse that a prophet that claims that the Jewish nation is no longer required/allowed to perform certain biblical commandments (Rambam adds the test if he tries to establish a new religion (as Jesus did)), he is by default a false prophet, even if his prophecy came true. Rambam further discusses it
Therefore, if a person will arise, whether Jew or gentile, and perform
a sign or wonder and say that God sent him to:
a) add a mitzvah,
b) withdraw a mitzvah
c) explain a mitzvah in a manner which differs from the tradition
received from Moses, or
d) if he says that the mitzvot commanded to the Jews are not forever,
but rather were given for a limited time,
he is a false prophet. He comes to deny the prophecy of Moses and
should be executed by strangulation, because he dared to make
statements in God's name which God never made. (
Yesodei haTorah - Chapter Nine)
However, there is a provision for a temporary ability to overrule biblical commandments by "someone who is widely known to be an expert and a complete and total righteous person, such as Elijah the Prophet on Mount Carmel, for at that time offering sacrifices on personal alters was forbidden" (Rashi, ibid).
When a prophet - who has already proven himself to be a prophet -
instructs us to violate one of the mitzvot of the Torah or many
mitzvot, whether they be of a severe or light nature, for a limited
amount of time, it is a mitzvah to listen to him
(Rambam - Yesodei haTorah - Chapter Nine)
Additionally, if a prophet prophesies calamity and it fails to occur, he is not immediately proven a false prophet. Only if he prophesies a positive outcome which fails to pass, is he immediately labelled a false prophet. As Rambam writes
As to calamities predicted by a prophet, if, for example, he foretells
the death of a certain individual or declares that in particular year
there will be famine or war and so forth, the non-fulfillment of his
forecast does not disprove his prophetic character. We are not to say,
“See, he spoke G‑d does not retract from a promise He has made of good,
or peace, or return and his prediction has not come to pass.” For G‑d
is long-suffering and abounding in kindness and repents of evil. It
may also be that those who were threatened repented and were therefore
forgiven, as happened to the men of Nineveh. Possibly too, the
execution of the sentence is only deferred, as in the case of
Hezekiah. But if the prophet, in the name of G‑d, assures good
fortune, declaring that a particular event would come to pass, and the
benefit promised has not been realized, he is unquestionably a false
prophet, for no blessing decreed by the Almighty, even if promised
conditionally, is ever revoked . . . Hence we learn that only when he
predicts good fortune can the prophet be tested
Yesodei haTorah 10:4
Thus, the only way to test a prophet is to test a positive prophecy he or she makes.
Often miracles were used by prophets to partially prove their veracity (such as Moses did in front of Pharaoh's magicians).
Not everyone who performs signs or wonders should be accepted as a
prophet: only a person who is known to be fit for prophecy beforehand;
i.e. his wisdom and his [good] deeds surpass those of all his
contemporaries. If he follows the paths of prophecy in holiness,
separating himself from worldly matters, and afterwards performs a
sign or wonder and states that he was sent by G‑d, it is a mitzvah to
listen to him (Rambam, Yesodei haTorah - Chapter Seven, Verse 7), as the verse states: "Listen to him" (Deut. 18:15).
This link has a more in-depth layout of prophecy in Judaism.
Rambam in Chapter seven discusses how prophecy works. In Chapters 8-10 he discusses how to test and verify a true prophet from a false one.