The Holy verse says:
" They wish you would disbelieve as they disbelieved so you would be alike. So do not take from among them allies until they emigrate for the cause of Allah . But if they turn away, then seize them and kill them wherever you find them and take not from among them any ally or helper." (4:89)
First of all let's put the verse in its right context by mentioning the verse right before and the verses right after it. The Holy Quarn says:
"What is [the matter] with you [that you are] two groups concerning the hypocrites, while Allah has made them fall back [into error and disbelief] for what they earned. Do you wish to guide those whom Allah has sent astray? And he whom Allah sends astray - never will you find for him a way [of guidance].(4:88)
They wish you would disbelieve as they disbelieved so you would be alike. So do not take from among them allies until they emigrate for the cause of Allah . But if they turn away, then seize them and kill them wherever you find them and take not from among them any ally or helper. (4:89)
Except for those who take refuge with a people between yourselves and whom is a treaty or those who come to you, their hearts strained at [the prospect of] fighting you or fighting their own people. And if Allah had willed, He could have given them power over you, and they would have fought you. So if they remove themselves from you and do not fight you and offer you peace, then Allah has not made for you a cause [for fighting] against them. (4:90)
You will find others who wish to obtain security from you and [to] obtain security from their people. Every time they are returned to [the influence of] disbelief, they fall back into it. So if they do not withdraw from you or offer you peace or restrain their hands, then seize them and kill them wherever you overtake them. And those - We have made for you against them a clear authorization. (4:91)"
Second let us explain the meaning and cause of the verse.
This verse speaks about the hypocrites. There are actually two stories regarding these verses. One says that these hypocrites are the ones who had outwardly embraced Islam in Makka and in other parts of Arabia, but instead of migrating to the Domain of Islam they continued to live among their own people who were unbelievers, taking part in all their hostile machinations against Islam and the Muslims. It was not easy for the Muslims to decide how to deal with such people.
Another story says that 'Abdullah ibn Hamid, may Allah have mercy on him, has narrated from Mujahid, may Allah have mercy on him, that some disbelievers of Makkah came to Madinah. They pretended to have become Muslims and claimed to have come there as emigrants. Later, they turned into apostates. They went to the Holy Prophet , peace be upon him and told him about their plan to go to Makkah to buy merchandise from there. Having made their false excuse, they departed for Makkah and never returned.
There arose a difference of opinion about their behaviour among the Muslims of Madinah. Some said that they were believers since they professed Islam, performed Prayers, fasted and recited the Qur'an they could not be treated as unbelievers. Others said they were hypocrites and cannot be trusted.
Starting from verse (4:88) till (4:91) God is telling Muslims how to deal with them.
The verse starts with rebuking the Muslims who have two different opinions about these hypocrites. God says that He has reverted them only because of the sins they did by their own free will. He is reproaching the Muslims who think they can lead such people the right way even though God has let them go astray because of their evil deeds.
Then God teaches Muslims how to deal with them. Give them the chance to decide once and for all. If they emigrate to Medinah and decide to stay with you then forgive them, but if they insist on taking the side of the disbelievers then fight them, seize and kill them because at that time they CHOSE your enemy's side.
However this verdict cannot be applied in all cases. The verse (4:90) explains one of these special cases. If a hypocrite takes shelter among an unbelieving people with whom the Muslims have an agreement he should not be pursued into that territory. It is not permissible for Muslims of the Islamic state to kill a hypocrite in any territory with whom Muslims have a peace agreement (even if they were not Muslims). This is because the sanctity of the agreement concluded by the Muslims is of the highest priority.
Another exception is mentioned in the verse (4:91). It speaks of the people who are hesitant and cannot decide which side to take. This verse speaks of the tribes Bani Asad and Khatafan who were afraid to choose any of the sides. They were afraid of both the Muslims and the disbelievers. Whenever they met the Muslims they claimed to be with them, but when they met the disbelievers they ran to their side. Muslims in such case should secure them till they reach the side they want. Either they stay with the Muslims or live in territories making peace with Muslims (in these cases Muslims are not allowed to fight them) or they can finally choose to go with the disbelievers in this case and in this case ONLY Muslims should fight them because now they are part of the enemy. These are the ones Muslims should seize and kill.