
Islam began among the desert Arabian people in the 7th century C.E. It did not spring out of a religious vacuum. The people in this region followed and were exposed to various religions. Christianity had been very familiar to the the people. Judea, the home of Christianity was not far from Arabia. Damascus, Caesarea, Antioch, and Alexandria were neighbors to Mecca and Yathrib (Medina).
The people of Arabia would have also been familiar with Judaism. Several desert tribes were Jewish. Although the origins of these tribes are unclear, many historians believe that they were the descendants of Jewish people exiled from Judea by the Romans in 70 C.E. and 135 C.E. When the Prophet Muhammad (ﷺ) entered Medina in 622 C.E. many of the residents of the city were Jewish.
Another religion that was prominent at the time in the region was Zoroastrianism. It is possible that Muhammad and some of his disciples engaged with Persian Zoroastrians.
Perhaps the major religious force from which Islam emerged and/or reacted against was the native religion of the Arab people. We know very little about the religions of the Arabs before Islam, as the only record and accounts come from Muslim sources. These are naturally going to be critical of the religions that were replaced.
It was documented that the pre-Islamic people (who were not Jewish or Christian) worshiped a variety of gods, though they recognized one supreme creator deity. who was separate and unapproachable by human beings. They called this deity ‘Allah,’ which translated to ‘The God.’ However, the deities that received the most attention and worship were the local tribal gods. Images of these gods were carved and cherished. Blood sacrifices were made to them. In addition to a great pantheon of the gods of heaven and earth, there were lesser divine creatures. Supernatural beings like angels and faeries were believed to be helpful, and demonic creatures were feared and believed to be harmful.
The most obvious characteristic of some of these religions was they were animistic. The people believed they found gods and supernatural beings in stones, trees, wells, and animals. The city of Mecca became a hub of cultural exchange, especially of animistic ideologies. It was also a trading/caravan depot, where people came to sell and exchange goods from distant lands.
Mecca is located on the central-western coast of Arabia, and in those earlier times, is was along the north and south caravan route. It became famous for the mysterious meteoroic stone than had fallen there centuries before. The stone was an object of veneration to the animistic population. By the time of Muhammad (ﷺ), there was already an enclosure built around this stone. This enclosure was called the Kaaba. Eventually the Kaaba was filled with many relics and icons and other objects revered by the people who traveled there as pilgrims and with trade caravans.
(There is a legend which surrounds the black stone and the Kaaba that houses it. A legend about the prophet Abraham (ﷺ) and his son Ishmael. See: Legend of Al-Hajaru Al-Aswad and The Story of the Kaaba.)