Innal Hamdu lillaah, Nahmadahu wa Nastaeenahu wa Nastaghfirahoo wa Na toobu Ilaah/Surely all praise and thanks is to Allaah, we praise and thank Him and seek His help and ask His forgiveness and repent unto Him.
The Beginning of Shirk (Polytheism)
Know that shirk began with Noah's people. When Allah sent Noah to them, inviting them to worship Allah, alone, and to stop worshipping idols, they were stubborn and insisted upon continuing in their shirk. They answered Noah's invitation with their Kufr (disbelief) and accused him of being a liar. In the Glorious Quran it says that they said,
"And they have said, 'Forsake not your Gods, forsake not Wadd, nor Suwa, nor Yaghuth, nor Ya'uq nor Nasr (names of the idols).'" (71:23)
In Sahih Bukhari we find the following narration, "Narrated Ibn Abbas (may Allah be pleased with him): "These are the names (of the idols) which formerly were pious men from the people of Noah. When they died, Satan inspired the people to (prepare) and erect idols at the place where they used to sit, and to call these idols by their (the pious men) name. The people died, but the idols were not worshipped until the people had died, and the origins of the idols had obscured; whereupon people began worshiping them." (Authentic).
Imam Ibn Al-Qayyim (may Allah have mercy on him) said, "More than one of the Salaf (*the companions, the generation which followed them, the third generation and those of the scholars who followed them in their understanding and practice of the Quran and the sunnah). said, when the pious men of the people of Noah died, the people who followed them secluded themselves by the graves of the pious men. They prepared idols which resembled the pious men and with the passage of time, they began to worship them."
The Cause of Shirk is Extravagance in Honoring and Loving Pious People
From the above verses and hadith, we know that shirk among the children of Adam results from extravagance in loving and honoring pious men. The word Ghuluw (extravagance) means exceeding the limitations in honoring through praising and believing. This is why Allah says,
"O people of the scriptures, do not exceed the limits in your religion nor say of Allah aught but the truth; the messiah Jesus, son of Mary, was (no more than) an apostle of Allah and His word, which He bestowed on Mary and a spirit created by Him; so believe in Allah and His apostles. Say not: Three (trinity). Cease: (it is) better for you: For Allah is (the only) One God. Glory be to Him (far exalted is He) above having a son. To Him belongs all that is in the heavens and all that is in the earth. And sufficient is Allah as a Disposer of Affairs." (4:171).
This means: do not exceed in the honoring of him. Do not put him over the level which can be given to any but Allah. This is why, in the authentic hadith, narrated by Omar Ibn Al Khatab it is said that,
"The messenger of Allah (Allah's grace and peace be upon him) said, 'Do not praise, laude, approbate, or eulogize me the way that the Christians did to Jesus, the son of Mary. I am only the slave of Allah', thus say, 'The slave of Allah and His messenger.'" (Authentic: Bukhari, Ahmad, Darimi, and others.)
Thus, the meaning we extract from all of this is: do not exceed the limit in praising and lauding Muhammed (peace be upon him) because the end result is putting him above the level where Allah placed him as the Christians exceeded the limits by claiming that Jesus was divine. Yet, despite the warnings, the commands and the forbidding by our prophet (peace be upon him), the ignorant people and those who are hallucinating refuse to do so. They went as far against him as they could, and they became equal to the Christians in their extravagance and shirk. They built domes and mosques over the graves of the pious people, and they started offering their prayers inside for the sake of Allah but with the intention of honoring those people buried in their graves. They also started to go around these graves the way they go around Al Kaaba. They call upon these people to end their hardships and to give them their desires. Thus, they started believing that offering prayer inside these domes and monuments is better than offering prayer in the mosques. In the authentic hadith, narrated by Aisha about the prophet (may the grace and peace of Allah be upon him) she said,
"As the messenger of Allah was about to breathe his last breath, he drew his sheet upon his face, and when he felt uneasy, he uncovered his face and said, (in this very state) 'Let Allah's curse be upon the Jews and the Christians, that they have taken the graves of their prophets as places of worship (masjid).' He, in fact, warned (his men) against what they (Jews and Christians) did." She (Aisha) reported, "Had it not been so, his (the prophet's) grave would have been in an open place. But it could not be (in an open place) due to his (the prophet's) fear that it might be taken as a masjid." (Authentic: Bukhari, Muslim).
The prophet (peace be upon him) cursed them because of their actions of taking the graves of the prophets and the pious people as mosques. (ie: churches or other places of worship wherein they prostrate for Allah; even though they do not call it mosque because the consideration is to the meaning, not the terminology. The same goes for the tombs and mosques which are built over the graves of the prophets and pious people.) Because these are the mosques, whose builders were cursed by the prophet, even though they (the builders) do not call their buildings mosques. In this hadith is a clear answer to those who believe that it is lawful to erect buildings over the graves of the scholars and pious people in order to distinguish them from the others because the prophet cursed those who built over the graves of the prophets. (What would he had said about building over the graves of those who were not prophets?) (Tayseer Al Aziz Al Hamid p.322) These people who went against the commands of the prophet (peace be upon him), also showed their extravagence in their poetry and prose. Their extravagence is too much to even be counted, to the limit that they made it lawful to call upon the messenger and the pious people to grant them their wish in the same way (and kind) they call upon Allah. They accused the prophet (peace be upon him) of knowing the unseen to the extreme that some of them said, "The messenger did not leave this life until he knew what was in the past and what is going to happen in the future." They disagreed with the crystal clear Quran,
"(And with Him) the key of the unseen, none knows them but He." (6:59)
And Allah said,
"Verily the knowledge of the Hour is with Allah (alone). He sends down the rain and knows that which is in the wombs. No soul knows what it will earn tomorrow, and no soul knows in what land it will die; verily, Allah is All-Knower, Aware (of all things)." (31:39)
Allah said about the messenger,
"If I had the knowledge of the unseen, I should have an abundance of wealth and no evil should touch me." (7:188)
"Say (O Muhammed), 'None in the heavens and the earth knows the unseen, except Allah.'" (27:65)
This verse plainly indicates that Allah is the only one who knows the unseen, and no other than He knows it. This is why Aisha said, "Whoever claims that Muhammed knows the unseen has spoken a great lie against Allah." (*Authentic: Muslim). And whatever he told about the unseen was a revelation to him from Allah. By now it should be clear that shirk occurred due to extravagence in loving and honoring the pious people. The messengers, from the first to the last, were sent to call and invite the people to worship Allah alone, with all acts of worship, not to prove to the people that He (Allah) is their creator because they (the polytheist people) already believed in this. For this reason, they (polytheists) said to the prophet, as Allah said in the Quran,
"They said, 'You have come to us that we should worship Allah, alone, and forsake that which our fathers used to worship.'" (7:70)
Which means that they answered the prophet (peace be upon him) by saying, you want us to serve Allah, alone, with our acts of worship, without worshiping with Him other Gods?
"They said: "Comest thou to us, that we may worship Allah alone, and give up the cult of our fathers? bring us what thou threatenest us with, if so be that thou tellest the truth!" [Quran 07:70]
Two Kinds of Shirk
Shaikh Al Islam Ibn Taymiyah said,
"There are two types of shirk, major and minor. Paradise is for those who are free of both. If any dies while he is committing major shirk, (* without repenting even though he knows he is doing so), will be in the hellfire and won't be able to come out. Whosoever was free from the major shirk, while committing some minor shirk and has more good deeds than sins, will be admitted to paradise. Also, whosoever is free from major shirk, but has committed minor shirk by which he increased his sins to be heavier than his good deeds, will be admitted to the hellfire."
Ibn Taymiyah further said,
The eternal punishment of Allah, in hellfire, is for major shirk or if the minor shirk was abundant." The minor shirk in small amounts will not be punished by Allah if the sincerity of worship vastly exceeds it." "(Tayseer Al Aziz Al Hamid)
An example of the major shirk is prostrating and vowing to other than Allah. An example of minor shirk is showing off in front of people when worshipping Allah, or swearing by other than Allah without intentions of glorifying the creature in the way Allah is glorified. (* The meaning of showing off (Riya' a) in this example is, for example, when a person is making salat sincerely for the sake of Allah but if a person is present who might critisize a sign of inattentiveness, like letting one's eyes stray, the worshipper is more careful because the person is present, but they would not be if the person were not present, and the example of swearing by other than Allah as a minor shirk is swearing while there is nothing in one's heart that anything in this person or thing is in any way equal to or sharing any attributes with Allah.).
Subhanak allaahuma wa bihamdik/Glory & praise/gratitude is to You OH Allaah, ash-hadu allaa illahaa illa Ant/I bear witness there is none that has the right to my worship but You, astaghfiruka wa a tubu Eellaik/I ask Your forgiveness and repent unto You.