Classical Judaism and Christianity have claimed that Moses wrote the entire text of the Torah, and that the text of the Torah that is extant today is identical to the original, plus or minus a small number of scribal errors. However, the Torah itself never claims to be written by one person, let alone by Moses.
Throughout history, people have been troubled by the presence of the doublets and triplets that abound in the Torah and Tanakh (The Hebrew Bible, or the Old Testament). Doublets and triplets are stories that are told twice, with different points of view. Famous doublets include Genesis' creation accounts; the stories of the covenant between God and Abraham; the naming of Isaac; the stories in which Abraham claims to a King that his wife is really his sister; two stories of the revelation to Jacob at Bet-El. A famed triplet is the three different versions of how Be'ersheba got its name.
Further, there are many places in the text of the Torah that directly indicate that it wasn't written all at once by Moses. Some examples include:
The JEDP Theory regarding the origin of the Pentateuch or Torah. According to the theory, the Torah was created by latter editors by merging together four pre-existing accounts: the Jahwist, Elohist, Deuteronomist and Priestly accounts.
analysis of the Torah reveals four separate strands or sources, each with its own vocabulary, its own approach and concerns. Those four sources are:
The "J" source: In this source God's name is always presented as YHVH, which German scholars transliterated as Jahweh (the equivalent of the English transliteration Jehovah).
The "E" source: In this source God's name is always presented as Elohim (Hebrew for God, or Power).
The "P" source: The priestly material. Uses Elohim and El Shaddai as names of God.
The "D" or "Dtr" source: The source that wrote the book of Deuteronomy, and the books of Joshua, Judges, I and II Samuel and I and II Kings.
"R": Shorthand for the redactor who brought together the J, E, P and Dtr material into a unified source. There is evidence to believe that the redactor was Ezra the scribe.
The passages originally belonging to each account can be distinguished by differences in style (especially the name used for God, the grammar and word useage, the political assumptions implicit in the text, and the interests of the author.
Some Jews and Christians reject the theory entirely, and follow the traditional view that the whole Torah is the work of Moses.
Some scholars, such as the translators of the New International Version take a middle ground, believing that Moses was the author of much of the text, and editor and compiler of the majority of the rest.
Links: [Who wrote the Torah? Frequently Asked Questions]
Some scholars believe that the four sources can also be found in the book of Joshua, in which case the Torah and Joshua are referred to as the Hexateuch.