They used to divide themselves into Tribes, the famous one being the Quraysh, they were the one guarding the Kaaba and its surroundings. Among other things they would legislate laws and organize matters related to pilgrimage.
Also it was known that they were the descendant of the Prophet Abraham(a.s) through is son Ishmael (a.s), in there ignorance they would say that they are the one who follow the path of Abraham. They would claim this even though Abraham never worshiped Idols, but they saw their forefathers do so, so they follow in their path.
They would consult mediums, kill girls, have sex with prestigious figures in society in order to have a prestigious lineage, sacrifice to idols, making idols. Idol worship was a big business a business which Quraysh didn't want to do lose.
The idol worship started simple with a man of prestigious linage and authority coming back from a journey in Sham, there he encounter idols and asked to a person, "what are those?", the person said these are our intercessor with God, so when we need something we ask them. The man was amazed so it took the big one and took it back with him in Arabia. And a Arabia that was once Monotheistic became Polytheistic over time.
And there is much more to say on the subject Islamic literature is always nicely available and goes deeper into the subject.