Prophet Muhammad ﷺ received the Qur’an, the miraculous literal Word of God, gradually over the span of his prophethood. It was communicated to him from the Divine, at times directly and often through an angel. Revelation of the Qur’an began when he was 40 years old, when the archangel Gabriel came to Muhammad ﷺ and recited to him the following verses:
Read! In the Name of your Lord, Who has created (all that exists),
He has created man from a clot (a piece of thick coagulated blood),
Read! And your Lord is the Most Generous,
Who has taught (the writing) by the pen.
He has taught man that which he knew not.
[Qur’an, 96:1-5]
This revelation continued descending upon the heart of Muhammad ﷺ for 23 years until he passed away. Thereafter, while the Qur’an was primarily committed to memory, it was compiled into a single undisputed manuscript by the Prophet’s Companions.
Other, non-literal secondary revelations called Hadith, were also inspired to Prophet Muhammad ﷺ to supplement the Qur’an and ensure its proper understanding.