The Talmud (Hebrew: תַּלְמוּדtalmūd "instruction, learning", from a rootlmd "teach, study") is a central text of mainstream Judaism, in the form of a record of rabbinic discussions pertaining to Jewish law, ethics, customs and history.
The Talmud has two components: the Mishnah (c. 200 CE), the first written compendium of Judaism's Oral Law; and the Gemara (c. 500 CE), a discussion of the Mishnah and related Tannaitic writings that often ventures onto other subjects and expounds broadly on the Tanakh.
The terms Talmud and Gemara are often used interchangeably. The Gemara is the basis for all codes of rabbinic law and is much quoted in other rabbinic literature. The whole Talmud is also traditionally referred to as Shas (ש"ס), a Hebrew abbreviation of shisha sedarim, the "six orders" of the Mishnah.