The Prophet Muhammad (Peace be upon him), in the Year 11, on the 27th day of the month of Rejab, experienced a journey of a lifetime. The journey that he took is now known as Israk Mikraj ~ The Journey by Night.
After about 10 years of dakwah (missionary work), two people that were the closest to him died. They were Abu Talib, his beloved uncle and his wife, Siti Khadijah. Muhammad (pbuh) consoled himself through prayers and supplications to God.
How the Messenger prayed was like how his former predecessors prayed. The first prayer ever was performed by the prophet Adam. When he was cast out of heaven, and landed in Sarandib (Sri Lanka), he was directed by God to walk towards Mecca, and build the Ka'abah.
When that was completed, he performed thawaf , circumvating around the Kaabah seven times and prayed two rakaat . Thawaf is the practise of the malaikats angels that circumvate the Baitul Makmur in the seventh layer of the sky. Each action of the prayer is an ode to God, and revelling in His creations.