The prophet used to retreat in seclusion in cave Hira in the mount of Nur where he would meditate.
When the prophet was nearly 40 years old, towards the end of Ramadan, an Angel came in the form of a man and told him to read, to which the prophet replied "I cannot read".
The angel squeezed the prophet so hard that he couldn't breathe, this happened 2 more times until the prophet read the first verses of Surah Alaq.
After reading the first verses of Surah Alaq, the prophet felt as if the words were written on his heart and he was greatly shaken, he thought that he was possessed by evil spirits and so he fled from the cave.
When the prophet was half way down from the cave, he heard a voice say "O Muhammad, you are the messenger of Allah and I am Gabriel".
When the prophet looked up, he saw an angel filling the horizon and then the angel repeated the sentence.
After the first revelation, when the prophet returned home, he narrated the incident to Khadija who comforted him and took him to her cousin Waraqah bin Naufal who was a Christian and he said that he was indeed a prophet and the same angel had also come to Moses.
When the prophet did not get any other revelation after the first one for a considerable time, he feared that he had incurred the displeasure of Allah.
Many times, the prophet went to the top of the mountain and wanted to throw himself down, but the angel would appear and say "O Muhammad! You are indeed a messenger of Allah"
Sometimes after the first revelation, the prophet would see the angel flying in the sky seated on a chair, and so he rushed home frightened and asked Khadija to cover him with a blanket, and that's when the second revelation came to him.