The Prophet Muhammad (peace be upon him) taught us that prayer is a way of saying how we need God's grace for every single thing we have, and how God's power over all things is total. There are different kinds of prayers. Some are to praise Allah for all the wonderful things in the world and some are to thank him for his blessings. We often ask Allah to forgive us, telling him our fears and worries. At other times we pray for others to be helped and cared for.
The Prophet (peace be upon him) advised people to pray in times of peace and plenty, and not just in times of difficulty. One of his favourite prayers in the Qur'an was for parents: "My lord, have mercy on them, as they raised me up when I was little." He also said brotherly love was a great virtue. In his prayers to his creator for all of humanity, he would say: "O lord, all your servants are brothers."
The Prophet (peace be upon him) urged his followers to ask Allah for forgiveness: "Allah holds out his hand at night for those who have done wrong during the day to repent. And he holds out his hand during the day to for those who have done wrong during the night to repent."
To have God's special protection he would pray, "Allah save me from leprosy, insanity and incurable diseases. O Allah, save me from want, poverty and being humbled. Save me from doing wrong or being wronged.
The Prophet (peace be upon him) forbade believers to pray for their own deaths or even to think about suicide. "If anyone is in a very dreadful state," said the Prophet (peace be upon him), "let him pray, 'O Allah, keep me alive so long is life is good for me, and take away my soul to yourself when death is best for me."
One who prays for another in his or her absence will most probably have his prayers fulfilled for, as the Prophet (peace be upon him) explained, to every believer Allah has assigned an angel who says, "Amen! And to you the same." His own selflessness is shown by his praying even for those who harmed him.
The Prophet (peace be upon him), a keen observer of nature, regarded all natural things with a great sense of wonder. For example, seeing a new moon, he would pray, "O Allah, let its rays bring us security, peace and submission." Speaking to the moon, he would continue, "My lord and your lord is Allah. May this be a crescent of guidance and goodness."
The Prophet (peace be upon him) would urge people to remember Allah constantly, as he believed that "one who remembers his lord and one who does not remember his lord are as unlike as the living and the dead." Therefore the Prophet (peace be upon him) would urge his followers to remember Allah by day and by night, even if only by saying a few words. To make it easy for them to do this, he taught them a short prayer, saying: Two phrases are light on the tongue yet heavy in the and balance and beloved by the merciful. Subhan Allah wa bihamdihi, Subhan Allahil-Azeem. (Glore be to God and all praises are his, glory be to God, the magnificent).
Source: Khan, Saniyasnain, Tell me about the Prophet Muhammad (peace be upon him), Goodword, New Delhi, India, 2003.