Hey! In addition to the links posted by the amazing /u/sunagainstgold, I've written about this a few times in the past in posts about What was the religion of the Arabian Peninsula before Islam. I'll take from some of my past answer and expand upon them here for your second question. Hopefully this will help and I'll be able to answer whatever follow-ups you have on my breaks.
#What would Muhammad likely have believed?
While most of Arabia pre-Islam followed locally-based, polytheistic religions, there was a small movement of people called ḥanīfs. Being a ḥanīf essentially entailed in believing in Abrahamic monotheism (as opposed to the standard polytheism of the Arabian Peninsula at the time) but it wasn't a set religious creed. The Arabic root ḥ-n-f in ḥanīf means to incline, so ḥanīf was used in the Qurʾan to signal those who had returned to the monotheism of Abraham away from the idolatry of polytheism.
This sort of monotheism wasn't unknown. There were other figures around Muhammad's time who fell into such beliefs. One of them, the cousin of his first wife Khadija, Waraqah ibn Nawfal, was a hanīf with Christian leanings. Indeed, the fact that the Kaʿba (which became polytheistic pilgrimage center) was claimed to have been built by Abraham and his family meant that there would have been reasons for there to be ḥanīf around Mecca as a whole.
Wael Hallaq, one of the leading scholars on Islamic law, writes within his book The Origins and Evolution of Islamic Law that
Already in Mecca, Muḥammad conceived of himself as a ḥanīf, probably under the influence of a certain Zayd b. ʿAmr. Fundamentally monotheistic, ḥanīfiyya appears to have been a specifically Meccan religious development that was formed around the figure of Abraham and the Kaʿba, which he was believed to have constructed.
The ḥanīf definitely were partial to the other Abrahamic monotheistic faiths. Many of the ḥanīf ended up converting to Christianity (including Khadija's cousin Waraqah bin Nawfal) or, after the Revelation, to Islam. Zayd bin Amr was one of the few who remained fully ḥanīf, without converting to a more established religion.
Ḥanīfs as a whole were not a solifided movement, so they wouldn't have had a clergy. Certain men would preach in the countryside to those who would listen, as Muhammad would do later after the Revelation. Prior to this point, Muhammad would listen to Zayd bin Amr preach, which probably influenced the development of his own branch of monotheism.
Despite not being a solidified movement, the ḥanīfs tended to have some unifying characteristics. In an old paper, Charles Lyall wrote (by which I mean 1903, so methodology has definitely changed) about 3 of these characteristics. The Ḥanīf
all belonged to the Ḥijāz and the West of the Arabian Peninsula; (2) ... their doctrine was distinct from Christianity, although several of those who professed the Ḥanīfite faith adopted that religion, and was also distinct from Islām; and (3) ... it had certain specific features - rejection of idolatry, abstention from certain kinds of food, and the worship of "the God of Abraham"; ascetic practices, such as the wearing of sackcloth, are also ascribed to some of the Ḥanīfs (773 - 774).
The ḥanīf are not mentioned in any of the verses concerning the ʿaqd al-dhimma, or contract of protection, that was extended by Muhammad to the People of the Book. The traditional scope of the people of the book were the Jews and the Christians, the two other dominant monotheistic faiths who possessed certain customs, traditions, etc. (Although the definitions gradually expanded, with Zoroastrians, Mandeans, and controversially at times Hindus being included).
Part of this could very well be that there simply weren't many ḥanīfites, and that they were not organized enough to be considered a group worth mentioning. Charles Lyall writes that the word ḥanīf was only used by 2 poets in the time of Muhammad, and they attributed the adjective to only 10 men total (this is when ḥanīf is used to refer to a non-Islamic monotheist. The word can also be paired with the word Muslim to refer to a righteous Muslim). Of course, these are only the men important enough to be mentioned, but it holds that they were often individuals and not entire tribes who held ḥanīfite beliefs, so they wouldn't warrant the same official protections.
#On to the second part of your question, how did Islam acquire its respect for the People of the Book?
As you may known, Islam is an Abrahamic religion. The Ka'ba in Mecca, the site of the ḥajj pilgrimage, is believed to have been built by Abraham himself as a shrine to Allah. In the Islamic perspective, it was only later that the Ka'ba got coopted by the Arabian polytheists and Muhammad's smashing of the idols was a restoration of its original intent. Likewise, Judaism and Christianity are also Abrahamic religions. However, Islam sees itself as being a return to the purity of religion that Judaism and Christianity lost. This is why you will see many of the same prophets in the three religions - Noah, Abraham, Isaac, and even Jesus appear in the Islamic tradition. If I recall correctly, Jesus is mentioned by name in the Qur'an more than Muhammad himself is.
Being part of this established tradition was important for Muhammad to develop in the early years of Islam, as links to it gave credence and legitimacy to his movement. In fact, you'll see many more similarities between Islam and the other Abrahamic religions in the earlier stages of Islam than later. I'm on the subway now and so don't have access to my books, but Wael Hallaq mentions how the tribes of Yathrib/Medina, where Muhammad was invited to in order to become an arbitrator between the various tribes (including many Jewish tribes), were considered something akin to the "guardians of monotheism". Once Islam was more established and not dependent on the goodwill of these Medinan tribes to exist, Muhammad was able to make some changes that differentiated Islam from Judaism. For example, the qibla, or direction faced during prayer, was originally Jerusalem instead of Mecca.
In addition to theological links to the other Abrahamic religions, it is important to consider the simple reality of 7th century Arabia. Although Islam was extremely successful and rapidly grew, incorporating numerous tribes wholesale, they could not fight everyone. This especially became important with the expansion of Islam out of the Arabian Peninsula itself, when Christian client-states and Client-tribes of the Byzantine and Sassanid Empires joined forces with the nascent Muslim community.
Under the Caliph 'Umar, it was envisioned that Islam would be for the Arabs, who would exist as a sort of military caste above the conquered people who would retain their original religions. For this reason, people were not forced to convert even when militarily conquered. This meant that the conquered populations were disturbed as little as possible, and conversions were only on a voluntary basis. This precedent was set with Muhammed allowing the Jews and Christians of Arabia to keep their religion if they paid the Jizya (poll tax). This payment would make a member of the religions of the book - Jews, Christians, and later Zoroastrians - members of the protected class, or dhimmi. These people would be reserved from having to pay the Zakat tax and from military service within the empire. This isn't to say that taxes wouldn't get absurdly high though, as Ira Lapidus notes that taxes on peasants could reach upwards of 50% of the value of the goods. It does, however, mean that the Muslim invaders were not hated. Like I said, some Christian tribes had allied themselves with the Muslims against the Sassanians or Byzantines.
This led to the fact that the Religions of the Book flourished in the early days of conquest with Islams coming. Many previously repressed sects were able to abound, and apocalyptic messages were numerous. This changed though as time went on. 'Umar II (r.717-720) forbade Christians to hold powerful government positions. Other successive rulers forbade minority religions to ride horses, bear weapons, or show outward religious symbols in public. Repression came in waves, as one Caliph would crack down (Such as Yazid II destroying churches and animal sculptures) and then others relent. Keep in mind through all of this that from the 7th to the 11th century, upwards of half the world's Christians lived under Islamic rule, yet they were not forced to exile or forced to convert by force (at least in large-scale).
So in summary, one could say that Islam feels a religious affinity for the People of the Book as well as it serving as a useful tool during the later Islamic expansions.
I've got to wrap this up quickly for work. But I hope this helps and I'll try and answer follow-ups if you have any when I can!
Edit: For those who keep messaging me or posting comments the mods then have to delete. Yes, I wrote this on the subway. No, I don't have a superhuman memory that can recall exact quotes (although that would make life much easier and I wish I could...). Like I said at the head of my post, I pulled large amounts from previous answers and then provided more general summary.
This is an enormously complex topic with a lot of competing and evolving scholarly views, so there's lots of room to say more! In the meantime, our FAQ has a great section on the Arab world before Islam and the rise of Islam. I'd highlight a few answers in particular:
And one other thing I want to highlight about early Islam's interactions with other religions:
Islam is supercessionist with respect to Judaism and Christianity; it incorporate their ideas and says "Well, they got these parts wrong and we've got past it." Hence the basic religious-kinship principle. However, Islam has no genetic relationship with a contemporary major Central Asian religion: Zoroastrianism. As early Muslims armies conquered Persia, they often treated Zoroastrians as dhimmis, as People of the Book by proxy. The "Magians" were not subject to forced conversion campaigns or massacres; their houses of worship were not initially destroyed.
And this idea of applying an existing, tolerated religion to a newly-encountered faith/spirituality gets repeated in later eras of Islamic expansion. African traditional believers in West Africa are sometimes described essentially as Zoroastrians; Hindus are sometimes framed as a variety of ancient Greek pagan (somewhat respectable in Islam thanks to the strong scholarly tradition). In the 13th century, Iranian/Ilkhanate vizier and historian Rashid al-Din actually claims Buddha as a prophet of God, in the Islamic tradition, to facilitate interreligious relations and further court Eastern conversion to Islam.
The tolerance of other religions wasn't a guarantee (at some points, such as under the Almohads in North Africa and Iberia, neither was it for Christians or Jews, either...or Muslims perceived as not zealous enough, for that matter). The ruling class of pre-Islamic Persia, specificially, was given the choice to convert to Islam or lose their positions. That's a perfect example, actually--Zoroastrianism had been inseparable from imperial ideology, so converting to Islam also represented a transfer of loyalty to the new caliphate. Thus, when it was useful, Muslims found ways to justify the inclusion of other religions even on a theological level.
What this highlights is the importance of practicality in the idea of dhimmi status, of Peoples of the Book. It includes, but transcends, the original Abrahamic ties.
Student in Middle Eastern Studies here,
As /u/sunagainstgold mentioned below this is an extremely complex topic, but I'll try to explain it in the best way that I can. I'll answer the first question since I'm not sure what you mean with the second one.
How was Muhammad raised?
The main sources for the understanding of the life of Muhammad can be found in the Quran and later sources. This already creates two problems;
First, there is a very big debate as to the final recession of the Quran. The general assumption is that it was Uthman, the 3rd Caliph of the Rashidun Caliphate, who ordered that the Quran be collected. The word collected is important, because the Quran is the literal word of God through his messenger Muhammad. If you look at the reign of Uthman (644-656 C.E) you'll see that it was after the death of the Prophet. Added to that there is a chance that the Quran may have been written in order to justify certain policies of the Caliph during that time, we know this because pieces of the Quran were still being found after Uthman ordered the collection of it, which means he might have left some things out voluntarily. Other historians agree that is was Abd al-Malik ibn Marwan (646-705 C.E.), the fifth Umayyad caliph who was responsible for the final collection of the Quran. This is also plausible since there is reason to believe that Uthman didn't have the means to achieve such a feat in his time. Plus, the collection of the word of God fits into Abd al-Malik's centralization and unification policies. So even if the Quran can help us understand how the Prophet lived, it was certainly not collected or redacted during his time. Added to that, some passages might have been written to justify certain decisions or events during the reign of the Caliphs.
The second problems comes with the various later sources (Greek, Hebrew, Armenian and Islamic); they were written after the death of Muhammad. But despite the existence of various sources of different origins, it is virtually impossible to write a somewhat reliable biography of Muhammad. Harald Motzki explains it in The Biography of Muhammad: The Issue of Sources as follow:
" On the one hand, it is not possible to write a historical biography of the Prophet without being accused of using the sources uncritically, while on the other hand, when using the sources critically, it is simply not possible to write such a biography.”
It is therefore best to regard the story of the life of Muhammad as a work of creative storytellers or myth makers seeking both to understand and to explain The Prophet —and thus themselves—in light of narratives that were part of a shared or common Near Eastern religious, literary, and cultural heritage (Aaron Hughes Muslim Identities)
What we do know comes from one of the earliest sources from seventh century Armenian bishop Sebeos,because it seems to confirm what will later be written in Muslim sources. We know that Muhammad existed, that he was a merchant and raised as such to become one and that his eventual preachings were centred around the figure of Abraham.
According to the Islamic tradition, Muhammad was born in 570 C.E. in Mecca. He came from the Banu Hashim, a family within the larger Quraysh tribe. His family was quite important, if not the most powerful within the Quraysh. His parents and grandfatehr died when he was relatively young and so he came under the care of his uncle, Abu Talib. As a teenager, he accompanied his uncle on trading expeditions to Syria which gave him experience in commercial trade. Again, the sources tell us that a Christian monk named Bahira foresaw Muhammad's destiny to become a Prophet, the last Prophet to be precise.
Muhammad later married an older woman and widow by the name of Khadija. When he was about forty he went to the Hira cave (probably thanks to a pre-Islamic custom), where he saw the angel Jibril (Gabriel). This is where, according to Islamic tradition, Muhammad's prophetic journey started.
As you can see, answering the first question can prove quite tricky because of the two issues above. I hope however, you understand what I meant in the development of my answer. As for the second question, I wasn't sure I understood it correctly so I preferred not to answer. I feared it might not have been the answer you were looking for.
If you need more information about the things I said, please, feel free to tell me.
If you want more information on this topic; I highly recommend
If you want more information on the Caliphates and the Muslim conquests, Hugh Kennedy is the best I can recommend. Aaron Hughes' book is an excellent way to get to know the Muslim world and it's evolution through the years. From it's origins to 9/11.
Islamic tradition, as others have noted, contends that Muhammad was a ḥanīf prior to receiving his first revelation. However, some early traditions hold that he was first a polytheist. The most famous of these is the "bag of meat" story attributed to Ibn Ishaq, one of the Prophet's earliest biographers:
I [Muhammad] had come from al-Ta'if with Zayd ibn Haritha when I passed by Zayd ibn 'Amr on the high ground above Mecca, for Quraysh had made a public example of him (shaharathu) for abandoning their religion, so that he went forth from among them and (stayed) in the high ground of Mecca. I went and sat with him. I had with me a bag of meat from our sacrifices to our idols which Zayd ibn Haritha was carrying, and I offered it to him. I was a young lad at the time. I said 'Eat some of this food, O my uncle'. He replied 'Nephew, it is a part of those sacrifices of yours which you offer to your idols, isn't it?' When I answered that it was he said ' If you were to ask the daughters of 'Abdu'l-Muttalib they would tell you that I never eat of these sacrifices and I want nothing to do with them '. Then he blamed me and those who worship idols and sacrifice to them saying 'They are futile : they can do neither good nor harm ', or words to that effect... After that with that knowledge I never stroked an idol of theirs nor did I sacrifice to them until God honoured me with His apostleship"'.
In judging whether a tradition is authentic or not, historians sometimes use the "criterion of embarrassment:" If a story is embarrassing for the author, it's unlikely that the author invented it. It's very unlikely that Ibn Ishaq would have made up a story about the Prophet offering sacrifices to the gods of the pre-Islamic period, as idolatry was a sin even before Muhammad's revelation. It is therefore likely that this report is authentic.
For further discussion of this passage, see M.J. Kister, "'A Bag of Meat': A Study of an Early Hadith," Bulletin of the School of Oriental and African Studies 33 (1970): 267-75