Ascribing partners to Allah, that is, idolatry (shirk), is the gravest crime that can be committed against Allah. Allah stresses the seriousness of this crime in the Qur'an as follows:
Allah does not forgive anything being associated with Him but He forgives whoever He wills for anything other than that. Anyone who associates something with Allah has committed a terrible crime. (Surat an-Nisa: 48)
Idolatry has always been prevalent historically, and is also widespread in our time. Many people may consider it a remote possibility for them to be idolatrous, even as they immerse themselves in idolatry, for idolatry is ascribing Allah's attributes to other beings. For this reason, if a person's purpose in life is to earn the approval of beings other than Allah and please them, then they are ascribing partners to Allah.
Praying is one of the most important ways to protect oneself against idolatry, since while praying, the supplicant acknowledges Allah's existence and unity deep inside and recognizes that there is no one to turn to other than Him. For this reason, supplication protects a believer against idolatry. Supplication is also an acknowledgement of one's weaknesses before Allah and that He is the only One Who can help him. For this reason, prayer protects a believer against idolatry.
As the verse "O Prophet! Allah is enough for you, and for the believers who follow you." (Surat al-Anfal: 64) maintains, Muslims know that the only being from whom help is sought is Allah. He is the One Who is superior in every way, the Owner of infinite power, and the One Who sees and hears everything. He is Allah, Who is exalted above anything. He holds all the power in the entire universe. This being the case, help and forgiveness must be sought from no one but Allah, the One Who is Rich Beyond Need, Praiseworthy. In the Qur'an, Allah states the gravity of the error of praying to someone other than Allah:
So do not call on any other god along with Allah or you will be among those who will be punished. (Surat ash-Shuara: 213)
In other verses, Allah describes the situation of those who pray to others than Allah:
Those you call on besides Allah do not create anything. They are themselves created. They are dead, not alive, and they are not aware of when they will be raised. (Surat an-Nahl: 20-21)
Consequently, a sincere believer never prays to someone other than Allah. He implores only Him and asks for His help alone. In Surat al-Fatiha, the first surah of the Qur'an, Allah advises believers to pray in the following way:
You alone we ask for help. Guide us on the straight path, the path of those You have blessed, not of those with anger on them, nor of the misguided. (Surah al-Fatiha: 4-7)
What befits Muslims is to ponder over and grasp Allah's infinite might, submit themselves wholeheartedly to this might and ask for help only from Him. A contrary attitude brings grief both in this world and beyond. This is Allah's promise.