Ok for example you posted:
""kill the idolaters wherever you find them and take them prisoners, and beleaguer them, and lie in wait for them at every place of ambush."
I assume you were trying to quote verse 9:5 this is very common quote used by people criticizing Islam also used by the to so called ISIL trying to justify their extremists actions. If you don't read the Quran or at least the whole chapter which the sentence is from you will understand context.
You also need to know the occasions of revelation as all text have contexts, you can't take all the text in the Quran and apply it universally as some verses of the Quran apply to whom the person about whom they were revealed, other verses use that example of a broader principle, some apply only to the particular historical circumstance that they are addressing, some apply to that historical circumstance and analogous circumstances.
You didn't copy the whole verse:
And when the sacred months have passed, then kill the polytheists wherever you find them and capture them and besiege them and sit in wait for them at every place of ambush. But if they should repent, establish prayer, and give zakah, let them [go] on their way. Indeed, Allah is Forgiving and Merciful.
If you go read the start the of chapter you will understand that quote is from a time where a peace treaty between the muslims and the mushriks, it was broken by the mushriks verse 9.5 was during a time of war hence your quote it is apply to that period of time and the mushirks who broke the peace treaty.