When Muhammed was 25 he worked for a wealthy Widow named Khadijah despite their age gap, they fell in love and got married. For the next 15 years, Muhammed lived in wealth which mean't he traveled a lot. Seeing and experiencing new things every day. However, Muhammed discovered that living in wealth was not as amazing as he expected. He started realizing the gap between the wealthy and the poor.
When Muhammed was 40 he began to spend time in solitude. Muhammed spent a few nights in a small cave alone near Mecca. It was believed that Muhammed witnessed the angel Gabriel appear before him. Gabriel ordered him to recite a few words. Muhammad then preached in Mecca and was considered a prophet. He openly declared to the Meccans that there is only one God.
"O, Muhammad, you are the messenger of God, and I am Gabriel"
622, Medina
Opposition and threat of violence against Muhammad increased, so, In 619 CE, his followers moved to Ta'if, a nearby town for a short time. During the next two years, groups from Medina came to Mecca and converted to Islam. In 622, Muhammad fled Mecca after hearing of a plot to assassinate him. He and his friend hid in a cave and proceeded to safety in Medina. This trip is known as the Hijrah and marked the birth of a united Islamic community.