muhammad recited this qur'an to others and in his prayers. others have done the same ever since, some memorising parts of the qur'an and others memorising the qur'an in its entirety. this helped the qur'an to become unrivalled as a work of its time in terms of the care and effort which were employed to ensure that it would be preserved for all mankind.
once a part of the qur'an had been revealed to the prophet (pbuh) he would dictate it to scribes who would make written records of every word recited. these writings would then be read back to the prophet to ensure that they had been correctly recorded. others around at the time would make their own copies for their private use.
these fragments of revelation came together and were linked into a specific sequence. the sequence defined what is the current ordering of verses in the qur'an and the prophet (pbuh) affirmed that it was given to him as part of the revelation he received. this sequence was set out through the recitation of qur'an during prayers and in particular during the month of ramadan when the prophet (pbuh) would recite the whole of the qur'an in its correct order.
a year after the prophets death, it was entrusted to a main scribe zaid ibn thaabit to assemble these scattered documents on which the verses of the qur'an were written. he was especially qualified since not only was he a scribe, but he had also memorised the qur'an completely and was present during the final & complete recitation of the qur'an by the prophet.
zaid established and applied a rigorous method of work: he would not accept any writing that was not certified by at least 2 witnesses. the witnesses would have to have seen it being written down, not from memory, but at the very dictation of the prophet (pbuh).
having completed this task, the collection was given to abu bakr - the immediate successor to muhammad (pbuh) as head of state.
after the collection was made, it was kept & guarded by abu bakr and then the following head of state umar. the next head of state, uthman, decided to publish it so as to have copies available at the now remote frontiers of the islamic state. he did this by having four copies made. these copies became the standard against which all other fragments which people possessed were checked. at least one of these uthmanic copies still exists today.
this compilation of the qur'an was unanimously recognised as authoritative by the companions of the prophet at the time. it is a strong evidence that for the authenticity of the qur'an that no other compilation has been used for the 1400+ years since then no matter how implacable certain sections of the muslims were toward one another.
variations do exist however in the readings of the text even though there is no dispute about the basic form of the text. these variations come through slight differences in the words due to the old form of written arabic where diacritical marks (including for example short vowels) were not marked in the written text. this means that there is more than one reading that can fit the text. the prophet explicitly accepted some of these variations as equally valid and acceptable. the exact reading of the text as well as any differing readings were set through oral transmission of the recitation of the qur'an and through the choice of readings being obvious from the context. the difference in meaning that these differences in readings have is very slight.
the question arises of how reliable the historical reports are. this is not a new question by any standards. islam had a distinct advantage over previous religions in terms of the ability that the early muslims had to preserve the original teachings. the qur'an was completed in an environment that could not be more different from that of the material that now makes up the bible. muslims were not a persecuted community but the rulers of a state that was having military successes on all fronts. this made collection of historical data much easier and establishing the authenticity of various texts clearer.
the laws of the state that emerged from muhammad's great success as political leader were firmly based on the teachings of islam. this meant that a great deal of effort went into establishing what the teachings actually were. indeed this effort was often inspired by a strong religious intention to identify the truth of such matters. this motivation also ensured that clear honesty and objectivity is evident in how the studies were carried out. whole sciences grew up about which sayings of muhammad (pbuh) were authentic and which were doubtful. the reports were traced back through the people who narrated them. some reports were taken form what was written down at the time of muhammad (pbuh); others proved to be more dubious (the science to identify which were which is called 'uloom ul-hadith). the narrators of the reports of what muhammad said were investigated to see what their reputation was. for example, it was asked of narrators whether they were ever known to have lied (the study of narrators' reputations is called 'uloom ar-rijaal). only chains of reporters (isnad) containing just the names of 100% trustworthy narrators were considered reliable enough to use in law making. hadiths (sayings or narrations) were categorised depending on various criteria including this and many others, which influence the authenticity. much effort went into this and there is a vast body of literature on the subject.
of course establishing the exact authenticity of any particular hadith is never 100% possible but at some point the sources are judged to be reasonably sound and reliable and to reject a well-authenticated hadith would be judged unreasonable and therefore wrong.
as for the qur'an. there has never been any doubt about its authenticity. so many people memorised it by heart and there was from the time of muhammad a great deal of written material which contained the text of the qur'an. in all the history of the qur'an, since uthman commissioned written copies in the form of books, there has been one, and only one qur'an and there have been no changes in it. it is accepted by all muslims as the exact word of god.
one of the effects of the qur'an is that huge efforts were also made to preserve the meanings of the arabic language so that the sources of islamic law would not get lost through the evolution of the language. this has meant that the classical arabic can be studied today and modern arabic is very close indeed to its classical ancestor. the extent to which the arabic language has remained unchanged for 1400 years show just how significant the source texts of islam were to the early muslim generations. these all contribute to proving beyond reasonable doubt that the qur'an is the same qur'an that was revealed to muhammad and that the accounts of his life and his saying are generally very well authenticated and reliable - to an extent probably unlike the accounts of any other character in history.
people bent on denying islam sometimes try to make challenges to this account of events. however, to do so basically means believing that most if not all the muslims around throughout the history of islam were liars - is this reasonable?