The verse says:
"O Prophet, strive against the disbelievers and the hypocrites and be harsh upon them. And their refuge is Hell, and wretched is the destination." (66:9)
The verse clearly says "strive" not "kill" or "fight", the word "strive" never in the holy quran meant fighting alone. When fighting or waging war is required it is clearly mentioned like in the verse: "Fighting is ordained upon you and it is disliked by you;" (2:216) , however "strive" was used to mean using money and self like in the verse: "Those believers who sit at home, unless they do so out of a disabling injury, are not the equals of those who strive in the way of Allah with their possessions and their lives. Allah has exalted in rank those who strive with their possessions and their lives over those who sit at home; and though to each Allah has promised some good reward, He has preferred those who strive (in the way of Allah) over those who sit at home for a mighty reward." (4:95)
Islamic scholars explain the word "strive" to mean using negotiating making open discussions with the disbelievers using the Holy Quran to prove to everybody they are hypocrites and threatening them that hell is their expected destiny if they insist on fighting Islam. They use the verse: "So, (O Prophet), do not follow the unbelievers but engage in a mighty striving against them with this Qur'an." to prove their point.
History of our noble prophet prove this explanation. NEVER had he engaged in war against the hypocrites. The famous story when Abdullah bin Ubai ibn saalul , the chief of hypocrites, died, his son came to the Prophet and said, "O Allah's Apostle! Please give me your shirt to shroud him in it, offer his funeral prayer and ask for Allah's forgiveness for him." So Allah's Apostle, peace and blessing be upon him, gave his shirt to him and said, "Inform me (When the funeral is ready) so that I may offer the funeral prayer." So, he informed him and when the Prophet intended to offer the funeral prayer, 'Umar took hold of his hand and said, "Has Allah not forbidden you to offer the funeral prayer for the hypocrites? The Prophet said, "I have been given the choice for Allah says: "(It does not avail) Whether you (O Muhammad) ask forgiveness for them (hypocrites), or do not ask for forgiveness for them. Even though you ask for their forgiveness seventy times, Allah will not forgive them. (9.80)", he continued: "if I knew that asking forgiveness to them more than seventy times would make God forgive them I would have increased ". So the Prophet offered the funeral prayer and on that the revelation came: "And never (O Muhammad) pray (funeral prayer) for any of them (i.e. hypocrites) that dies." (9. 84)
This is how Prophet Muhamed, peace and blessings be upon him, behaved towards the hypocrites.