This is a key aspect of Islam that most non-Muslims do not understand. This lack of understanding is what makes so many people believe the Islamists when they claim to be the Religion of Peace.
Power Line Forum | Reading the Qur’an: Abrogation: "The Qur’an consists of a series of verses (after the first verse) ordered not by subject or chronologically but by length. However, Muslim religious scholars view the Qur’an as consisting of verses from two distinct periods; the early period when Muhammad lived in Mecca and the latter period after Muhammad and his followers fled to Medina (the Hejira).
The more peaceful and inclusive Meccan verses are from the initial years of Muhammad’s prophetic career when he had few followers and was trying to get the Pagans, Christians and Jews living in Mecca to accept his legitimacy as the ultimate prophet of the one true God, Allah and to accept the authority of the verses in the Qur’an as superior to and superseding the Torah and Judaism, the Bible and Christianity and Pagan beliefs. Muhammad was able to gather some few followers in his time in Mecca but, the illiterate Muhammad was not accepted, was disdained by the locals and had conflicts with them so, he and his followers eventually fled to Medina (the Hejira).
The much more violent and xenophobic Medinan verses are from the latter period when Muhammad’s started to use violence against his opponents, his military power grew and he could use that power and violence to force his opponents to accept him as a prophet and the Qur’an as supreme. "
-