At the age of 40 Hajrat Prophet Mohammad (SAAS) achived the Nabuwat. For 13 years of his Nabuwat was spread in Macca and the rest 10 years of Nabuwat passed in Madina.
How the Quran came- The Aayats of Quran came to us through the sacred tilawat (speech) of Hajrat Prophet Mohammad (SAAS) infront of Sahabas . Hajrat Prophet Mohammad (SAAS) used to say the Aayat of Quran and the Sahabas were writing instantly. After writing it was checked and rechecked by Hajrat Prophet Mohammad (SAAS) many times by saying again and again those Aayat. This book is the only Holy book which is untemperred. That means it is absolutely in original form. It is because Almighty Allah-Subhan-W-Tala (ASWT ) already told that he has taken the responsibility of Quran to preserve it till Qayamat.
I am requesting readers to add something esxtra by commenting if you know about Sarware-Qaaynat Prophet Mohammad (SAAS).