If you are asking this question, especially if you say it as such "why is it that killing is "just" in certain circumstances like it says in the Quran, as long as you don't harm a fellow muslim, right?" I know the type of sites you've been been getting your "Islamic" information from. Let me just give you an example, with the following verse.
009.005 ..fight and slay the Pagans wherever ye find them, an seize them, beleaguer them, and lie in wait for them in every stratagem (of war)..
You might have seen this verse and it sounds violent doesn't it? Well, I would agree and that in this context it does. However, there are several very important things we should note here.
1. This isn't even the whole verse
2. It is not in the context of the verses directly before and after it.
3. It is further completely stripped out of Qur'an, losing any overall message of the Book.
4. We are not taking any consideration as to why this verse was revealed in the first place, nor is the historical context of the condition of the Muslims and the Prophet Muhammad (saaw) looked into.
5. And although it isn't the case in this example, there are times where the words are changed.
Now this is the whole verse:
009.005 But when the forbidden months are past, then fight and slay the Pagans wherever ye find them, an seize them, beleaguer them, and lie in wait for them in every stratagem (of war); but if they repent, and establish regular prayers and practise regular charity, then open the way for them: for God is Oft-forgiving, Most Merciful.
Here is the verse in its textual context:
Surah 9 - Al Tawbah THE REPENTANCE
009.001 A (declaration) of immunity from God and His Apostle, to those of the Pagans with whom ye have contracted mutual alliances:-
009.002 Go ye, then, for four months, backwards and forwards, (as ye will), throughout the land, but know ye that ye cannot frustrate God (by your falsehood) but that God will cover with shame those who reject Him.
009.003 And an announcement from God and His Apostle, to the people (assembled) on the day of the Great Pilgrimage,- that God and His Apostle dissolve (treaty) obligations with the Pagans. If then, ye repent, it were best for you; but if ye turn away, know ye that ye cannot frustrate God. And proclaim a grievous penalty to those who reject Faith.
009.004 (But the treaties are) not dissolved with those Pagans with whom ye have entered into alliance and who have not subsequently failed you in aught, nor aided any one against you. So fulfil your engagements with them to the end of their term: for God loveth the righteous.
009.005 But when the forbidden months are past, then fight and slay the Pagans wherever ye find them, an seize them, beleaguer them, and lie in wait for them in every stratagem (of war); but if they repent, and establish regular prayers and practise regular charity, then open the way for them: for God is Oft-forgiving, Most Merciful.
009.006 If one amongst the Pagans ask thee for asylum, grant it to him, so that he may hear the word of God; and then escort him to where he can be secure. That is because they are men without knowledge.
009.007 How can there be a league, before God and His Apostle, with the Pagans, except those with whom ye made a treaty near the sacred Mosque? As long as these stand true to you, stand ye true to them: for God doth love the righteous.
009.008 How (can there be such a league), seeing that if they get an advantage over you, they respect not in you the ties either of kinship or of covenant? With (fair words from) their mouths they entice you, but their hearts are averse from you; and most of them are rebellious and wicked.
009.009 The Signs of God have they sold for a miserable price, and (many) have they hindered from His way: evil indeed are the deeds they have done.
As regards to what history has to say, you can check the following links:
http://www.muslimaccess.com/articles/jihad/kill_the_infidels.asp
http://www.examiner.com/x-9968-Baltimore-Muslim-Examiner~y2010m1d18-Islam-101-What-does-the-verse-in-the-Quran-kill-the-unbelievers-where-you-find-them-mean
http://www.readingislam.com/servlet/Satellite?cid=1220266448739&pagename=IslamOnline-English-AAbout_Islam%2FAskAboutIslamE%2FAskAboutIslamE
If you've got further questions you can drop me a line, Peace.