They way you do it is little by little. You first makes the person feel entitled, you give him reasons to hate the 'enemy', you remove accountability of the executant by using a strict hierarchy and by engineering the killing process. At one point it becomes 'normal' and 'logic' to do what you do.
The coping mechanisms are not perfect. What we now call PTSD has and will continue to destroy lives long after the fighting is over. But they do allow for continued functioning in the field. For better or for worse.
Source: "The Third Reich At War", by Richard J. Evans.
Turns out, in addition to our evolved horror of killing someone like ourselves we also have an evolved ability to dehumanize the other to the point where the "someone like ourselves" label no longer applies. Came in pretty handy, evolutionarily speaking, when two packs of monkeys ended up in close proximity, with insufficient food.
I've seen people die (or dead already) many times since then and... It doesn't really make you sick. The unpleasant feeling is still there, yes, but it's more about disgust than anything else.
How could anyone be complicit in the slaughter of tens of thousands of people in a single day, not even just in a moral sense but even in a physical sense. How does the body not shut down when confronted with the horror of such a thing?
If someone was shot in the head as I watched, even if I knew there was zero danger of being shot myself, I know that my body would react with pure revulsion and I would find it hard to stand up, much less take part. It seems it would just be an evolved response, something intrinsic.
But these men just slaughtered thousands of people like pigs - how? Why?