The Qur'an has outlined the base rule concerning the relationship between Muslims and non-Muslims who do not fight the Muslims on account of their religion and nor expel Muslims from their homes or lands.

Allah does not forbid you to deal justly and kindly with those who fought not against you on account of religion and did not drive you out of your homes. Verily, Allah loves those who deal with equity. (Al-Mumtahinah 60:8)

This verse was revealed during the truce between the Muslims and the Quraish of Mecca. The classical commentator Ibn Kathir stated in his exegesis of this verse:

...meaning that you are benevolent towards them and deal justly with them.

Ibn Kathir brings a number of narrations from Asma, the daughter of Abu Bakr (radiallahu anhu), whose pagan mother came to visit her in Medina, explaining that this was the reason for the revelation of this particular verse. Asma said:

My mother who was a pagan approached (Madinah) during the truce with (the tribe of) Quraish, so I came to the Prophet (sallallahu alaihi wa sallam) and said, "O Messenger of Allah, my mother has come and she desires to see me, shall I keep ties with her?" He said, "Yes, keep the ties of kinship with your mother."

Ibn Jarir at-Tabari, another classical commentator explains in his exegesis that there were a number of opinions regarding this particular verse, and mentions amongst them:

That this verse was particular only to those Muslims who were residing in Mecca but had not yet emigrated.

That this vere relates to people outside of Mecca who had not emigrated to Medina

That this verse was regarding the pagans of Mecca who did not fight the Muslims nor expel them from their homes, but that it was later abrogated with the command to fight the pagans (on account of their breaking the truce).

Then at-Tabari explains the correct viewpoint:

The most correct of these sayings is the statement of the one who said that what is meant by, "Allah does not forbid you to deal justly and kindly with those who fought not against you on account of religion?" (is that it pertains to) all of the factions from the varying beliefs and religions. That you behave good towards them, and that you are just regarding them, because Allah, the Mighty and Majestic generalised with His saying, "?those who fought not against you on account of your religion and did not drive you out of your homes?" So this applies to everyone who is characterised by this. He did not specify some as opposed to others in this regard.

And then at-Tabari goes on to discredit the view of those who said this injunction was abrogated. The esteemed Scholar from the last century Muhammad Ameen ash-Shanqiti (rahimahullah) has a lengthy discussion in his exegesis, Adwaa ul-Bayaan. Ash-Shanqiti mentions the various views, including the viewpoint that this verse was abrogated with the command to fight the pagans. He then goes on to provide historical and textual evidences to discredit this view bringing:

One: The statements of at-Tabari, ash-Shafi'i,after which he said:

This (view) that has been deemed correct by Ibn Jarir (at-Tabari) and which was authenticated by as-Shafi?i, may Allah have mercy upon him, is that which is necessitated by spirit of the Islamic legislation.

Two: The benevolence of the Prophet (sallallahu alaihi wasallam) towards specific non-Muslims, such as Thumama who had come to assassinate the Prophet but was captured by the Muslims. He was treated well, eventually released and he voluntarily became a Muslim.

Three: The various delegations that came to the Prophet (sallallahu alaihi wa sallam) in the 9th year after the hijra. Such as the Christians of Najran, and the delegation of Tamim, and others. With all of them, the Prophet (sallallaahu alaihi wa sallam) was gentle and kind, he was benevolent towards them.

Four: The treatment of the Jews of Khaibar who despite being treacherous - scheming a variety of intrigues, instigating the Bani Quraiza, and plotting against the Prophet (sallallahu alaihi wasallam) on numerous occasions - were spared. After being forced to surrender they were allowed to live off their land whilst giving a share of the produce to the Muslims.

Five: The verse in the Qur?an regarding the treatment of non-Muslim parents who force a person to worship others besides Allaah. Ash-Shanqiti said:

And in closing, that which makes this clear very strongly, and about which no one has claimed abrogation is the saying of (Allah), the Exalted, "And if they both strive to make you associate with Me (in worship) that of which you have no knowledge, then do not obey them. But accompany them in this life with goodness." (Luqman 31:15). This good behaviour and benevolence is towards the one who strove to make a Muslim associate others with Allah (in worship) but did not actually fight against the Muslims. Hence, the right of the parents are to be given precedence, even if they are upon disbelief, and strive to lead one to associationism (Shirk).

With these and other evidences ash-Shanqiti invalidates the view of those who spoke with abrogation of this verse. Ash-Shanqiti covered this issue in some depth in his Adwa ul-Bayan, explaining:

And we have lengthened the speech regarding this matter due to its importance and the dire need for it today.

Hence, in the view of these scholars it is established that the normal relation between Muslims and non-Muslims who do not show aggression or expel Muslims from their lands, based upon those Islamic texts, is one of benevolence and good behaviour.

As for the relationship of Muslims towards non-Muslims in the lands of the non-Muslims, that is addressed in this article.