The Gemara (also transliteratedGemora, Gemarah or, less commonly, Gemorra; from Aramaic noun גמרא gamar, literally, "study") is the component of the Talmud comprising rabbinical analysis of and commentary on the Mishnah. After the Mishnah was published by Judah HaNasi (c. 200 CE), the work was studied exhaustively by generation after generation of rabbis in Babylonia and the Land of Israel. Their discussions were written down in a series of books that became the Gemara, which when combined with the Mishnah constituted the Talmud.

There are two versions of the Gemara. The Yerushalmi, also known as the Palestinian, was compiled by scholars of Israel, primarily of the academies of Tiberias and Caesarea, which was published between about 350–400 CE. The Bavli was published about 500 CE by scholars of Babylonia, primarily of the academies of Sura, Pumbedita, and Mata Mehasia. By convention, a reference to the "Gemara" or "Talmud," without further qualification, refers to the Babylonian version, see Talmud.

The Gemara and the Mishnah together make up the Talmud. The Talmud thus comprises two components: the Mishnah – the core text; and the Gemara – analysis and commentary which "completes" the Talmud (see Structure of the Talmud).

In a narrower sense, the word Gemara refers to the mastery and transmission of existing tradition, as opposed to sevara, which means the deriving of new results by logic. Both activities are represented in the "Gemara" as a literary work. The term "gemara" for the activity of study is far older than its use as a description of any text: thus Pirke Avot (Ch.5), a work long preceding the recording of the Talmud, recommends starting "Mishnah" at the age of 10 and "Gemara" at the age of 15.

The rabbis of the Mishnah are known as Tannaim (sing. Tanna תנא). The rabbis of the Gemara are referred to as Amoraim (sing. Amora אמורא).

Because there are two Gemaras, there are in fact two Talmuds: the Jerusalem Talmud (Hebrew: תלמוד ירושלמי, "Talmud Yerushalmi"), and the Babylonian Talmud (Hebrew: תלמוד בבלי, "Talmud Bavli"), corresponding to the Jerusalem Gemara and the Babylonian Gemara; both share the same Mishnah. The Gemara is mostly written in Aramaic, the Jerusalem Gemara in Western Aramaic and the Babylonian in Eastern Aramaic, but both contain portions in Hebrew. Sometimes the language changes in the middle of a story.

The analysis of the Amoraim is generally focused on clarifying the positions, words and views of the Tannaim. These debates and exchanges form the "building-blocks" of the gemara; the name for such a passage of gemara is a sugya (סוגיא; plural sugyot). A sugya will typically comprise a detailed proof-based elaboration of the Mishna. Every aspect of the Mishnaic text is treated as a subject of close investigation. This analysis is aimed at an exhaustive understanding of the Mishna's full meaning.

In the Talmud, a sugya is presented as a series of responsive hypotheses and questions – with the Talmudic text as a record of each step in the process of reasoning and derivation. The Gemara thus takes the form of a dialectical exchange (by contrast, the Mishnah states concluded legal opinions – and often differences in opinion between the Tannaim. There is little dialogue). The disputants here are termed the makshan (questioner, "one who raises a difficulty") and tartzan (answerer, "one who puts straight").

The gemara records the semantic disagreements between Tannaim and Amoraim. Some of these debates were actually conducted by the Amoraim, though many of them are hypothetically reconstructed by the Talmud's redactors. (Often imputing a view to an earlier authority as to how he may have answered a question: "This is what Rabbi X could have argued ...") Rarely are debates formally closed.

The distinctive character of the gemara derives largely from the intricate use of argumentation and debate, described above. In each sugya, either participant may cite scriptural, Mishnaic and Amoraic proof to build a logical support for their respective opinions. The process of deduction required to derive a conclusion from a prooftext is often logically complex and indirect. "Confronted with a statement on any subject, the Talmudic student will proceed to raise a series of questions before he satisfies himself of having understood its full meaning." [1]. This analysis is often described as "mathematical" in approach; Adin Steinsaltz makes the analogy of the Amoraim as scientists investigating the Halakha, where the Tanakh, Mishnah, Tosefta and midrash are the phenomena studied.

Exploring the logical principles underlying the Mishnah's statements, and showing how different understandings of the Mishnah's reasons could lead to differences in their practical application. What underlying principle is entailed in a statement of fact or in a specific instance brought as an illustration? If a statement appears obvious, the Gemara seeks the logical reason for its necessity. It seeks to answer under which circumstances a statement is true, and what qualifications are permissible. All statements are examined for internal consistency.

Resolving contradictions, perceived or actual, between different statements in the Mishnah, or between the Mishnah and other traditions; e.g., by stating that: two conflicting sources are dealing with differing circumstances; or that they represent the views of different Rabbis. Do certain authorities differ or not? If they do, why do they differ? If a principle is presented as a generalization, the gemara clarifies how much is included; if an exception, how much is excluded.

Demonstrating how the Mishnah's rulings or disputes, derive from interpretations of Biblical texts. The Gemara will often ask where in the Torah the Mishnah derives a particular law. See Talmudic hermeneutics.