To "kill" is to take life. To "murder" is to take somebody's life illegally.
In places where capital punishment exists, the executioner "kills" the criminal. However, the executioner does not "murder" the criminal, because the executioner is not breaking the law. In fact, he is carrying out the law.
Similarly, in war, soldiers "kill" other soldiers, but they do not "murder" them because killing in war is considered legal.
To get even more technical, in US law, "murder" has a restricted meaning. There are illegal killings that are not murder. Consider a careless motorist who fails to stop at a red light, hits a pedestrian, and kills them. He has broken a law and committed a crime. However, the crime is not "murder." I'm not a lawyer, so I can't say for sure what it is, but it might be "manslaughter" or "negligent homicide."
The book of Exodus contains a passage known as "the decalogue" or "the Ten Commandments." The most famous English translation, the 1611 King James Version, translates one of them as "Thou shalt not kill." Some have interpreted this to prohibit soldiers from killing in war. The famous World War I hero, Sergeant Alvin York, said "I didn't want to go and kill. I believed in my Bible." However, many modern versions translate the same commandment as "You shall not murder." Stated that way, it does not prohibit soldiers from killing in war.