Muhammad's revelations revealed the text of the Qur'an to him section by section. His revelations began in 610 AD when he was alone on a mountain near Mecca.
During the first revelation, an angel compelled him to recite (or read, the language is unclear) the first verses of the Sura al-'alaq (or 96 sura). There was a gap of a period of time between the first revelation and subsequent revelations called a fatra, or pause.
After the period of fatra, the revelations came regularly and often and revealed the remainder of the Qur'an to Muhammad, including the nature of paradise and hell, the duties of human beings to Allah and the way people should live.