Compare to
Halacha. See Also
Judaism,
Talmud, and
Bible/
Torah
Midrash, to explain literally, is "findings" in the text of the Pentateuch, ie. old testament. Given that the bible was written by God, something that is probably the biggest philosophical difference between Orthodox Judaism and other branches (Reform Judaism, Conservative Judaism, etc.), it is ridiculous to assume that if something is phrased awkwardly it was not done on purpose. Given this, there is a tradition, which was definitively written down around the time that the second temple was destroyed, around almost sentence in the Chumash (Five books of Moses,) most of Psalms, and many other sections of the Old Testament. This tradition is that the events recorded in Midrashim, unless certain specific condition are met, are to be considered literally true. All of the understanding that come out of the stories, those literally true and those not, were written in a complicated, allegorical form so that while everyone could understand the literal meaning, the lessons that could be derived were much deeper.
Midrashim (the plural of Midrash) were collected in collections in the form of quotes from Rabbis that lived between 100 B.C.E. and 300 C.E. This can be seen clearly from the language that the Midrash is written in, clearly the same mix of Hebrew and Aramaic that most of the Mishna is written in. These rabbi's statements form the corpus of tradition that extends beyond midrashim, to the Mishna, and other Halachic statements, collected in the Braitha and Tosefta, as well as some smaller, less important collections. Midrash, however, extends further than this, with collections being written as late as 700 C.E. The collections, of which there are many, are all well known, and as far as texts from the period go, amazingly consistant texts. The statements in all of the Midrash are of a uniform type; they attempt to explain what is was that God intended when he spoke to Moses, giving him the Torah.
A Midrash typically looks at some aspect of a pasuk, or verse, in the Bible, and shows that there is some meaning that is not contained in the "classic," simple understanding of the verse. This happens in one of several ways. Since there is no punctuation of vowelization in the text of the torah, often a statement can be read in more than one way, and these alternative readings have some additional message about the verse to give over. A typical example of this, though Talmudic instead of Midrashic, is that in Hebrew, the same word can mean next to, or under; when the verse says that the Jews were standing next to the mountain, it could also be read as saying that they were under the mountain. In the Talmud, Tractate Shabbat, it goes on to say that if the jews were to refuse the Torah being offered to them "then this will be their grave." Another type of Midrash commonly seen is one where the verse is a double entendre because it can be punctuated in at least two different ways, with the second meaning being the Midrashic interpretation.
Many Midrashim that discuss, for instance, The book of Ester or Ecclesiates (Kohelet), are clearly from that time period, as the discuss specific events relating to secular people who were either alive, or had died recently enough that they were used to illustrate points. Of specific note is that many Midrashim discuss stories about Roman Emperors, officers that served in Israel, and many discussions of current events in Bablyonia where the Midrash was mainly compiled.
All of these Midrashim, however, are intended to teach something. The Midieval commentators, who were very familiar with all of the Midrashim extant at the time (including several collections that were subsequently lost,) frequently quote them in their explanations of the text of the Bible. Included in this group is Rashi, the Ramban, and almost every other biblical commentator of the period, with the somewhat later, but notable exception of the Abarbanel, who claimed that since it was unclear which Misrashim were literal, it would be better to examine the text of the Bible rather than rely on them.
The moral lessons that the Midrash is supposed to teach is sometimes unclear, but with even a cursory understanding of Midrashim, several symbols are obvious. To mention the most flagrant of these, any time a king is mentioned, it will refer to God. Any time a challenge or mission is mentioned, it will refer to man's existance in the physical world. If there is a prince, it will probably refer to the Jewish nation, and if there is a conversation between a Jew and Non-Jew, it is probably, allegorically, a philosophical debate. Given enough background in Talmudic logic, Jewish Philosophy, and the language, one begins to peice together the intricate structure of what is collectively known as the Midrash. Themes begin to tie together, and seemingly disparate ideas are suddenly intimately connected. This is when Midrashim begin to really make sense.
Note
Firstly, Midrash is sometimes translated as legend, or tales. This is a gross misunderstanding of the nature of the stories, and could only be translated this way by someone without any particular understanding of how the "legends" were written, and the messages behind them. A better definition is probably allegory, or homily.
Secondly, Midrash, as used in Jewish homes throughout the world for hundreds of years, does NOT include the Halachic aspects of Tannaic statements. Any statement found in Midrashim, even if seemingly relating to a law, is in fact discussing something different, even if the Midrash is exactly what is understood to be the law. Frequently this is misunderstood, and people think that Midrash has something to do with how the Halacha is derived. This is Incorrect. The Midrash is still studied, and there was no "decision" to discard them, or even to exclude them from the corpus of works considered important by Orthodox Jews. They are as important as the Mishna, in a different way.
Thirdly, the "fact" that Midrashim are, or were, not intended to be taked literally is completely untrue. There are Midrashim that are not literally true, but there are those that are. This is according to many sources, including Avraham ben HaRambam (The Rambam's son,) in the name of his father, Rashi, and almost every other Midieval commentator, including the Abarbanel, who chose not to use them to explain the text of the bible.
And lastly, "Ashmedai, king of the demons" is not the name of any collection of Midrashim I, or any scholar of Midrash at Hebrew University, has ever heard of.