Morality is built on our understanding of good and bad, and by definition these are relative: we have good and better, bad and worse. Good and bad are also contingent (e.G. It's fine to feed sugar to a starving man, but not a diabetic), and subjective (e.G. Some experiences are more traumatic for some than others.) But that doesn't mean morals are arbitrary: it's always bad to abuse power, for example.
So how do we develop morality? Because it's not arbitrary, we can't do it on our own: we have to draw on the collective wisdom and insights of society. But equally, we can't simply express it as some list of dos and don'ts, because that ignores critical complexity and makes us stupid.
Morality has to develop from discussion, using compassion, wisdom and hard evidence. So-called 'received' morality -- absolute dos and don'ts -- may be very convenient, but consign us to fear, superstition and ignorance. And we know from history that ignorant people who insist they're right sometimes do more harm than people who simply break bad laws.
I hope that may help. :)
For example most of the time killing is wrong, but lets say you are in a situation where you can either kill 1 person, or let that one person kill 20 people, in that case it would be immoral to let them live, and therefor letting them kill those 20 people.
Morality is a subtle thing, forged by humans to weave the fabric of civilization. Morals are necessary for maintaining the human cultural stronghold of civilization. Yet, without these morals being relative, instead being straightforward, then the loopholes of society will force upon us anarchy. Morality is never absolute. You might say killing a person is wrong - what if a person was undergoing immense torture, emotionally and (primarily) physically, and wished death, but was powerless to end his life ... If he begged you for death? Not obliging would be cruel (by the polar definitions of society). Obliging will not be immoral, for you are helping the life, unless there are side-effects to other people. To maintain human psychological bias of "morality" and allowing that sense of righteousness prevailing over the suffering of an innocent life-form is, even in human terms, immoral. If we shattered morality to do something immoral, it would be "wrong" as it breaks the very psychological barriers of human culture; to shatter morality to do something moral by a different perspective, a relative moral, then it merely reforges the essence of human psychology: compassion. All animals feel love and empathy, yet the human chemical reactions and nervous charges are more complex and defined; this complex structure forced us into the barriers of society, to tear through boundaries of "right" and "wrong". This was, of course, a biological way to maintain our species; but our mind has transcended biology into a field of moral philosophy and ethics, built to ensure revitalization of society. And we must enforce those beliefs upon ourselves to ensure we stand as a species, a species that has evolved to strengthen not just ourselves, but other species as well. Yet, we no longer strengthen the Earth, instead obliterating it in its fragile state. We must urge ourselves to embrace the human concept of relative "morality", and join the struggle to maintain the ecological balance of Earth.
I can see what you are saying, but consider this.
It is not all of a sudden right to kill the one man who would kill 20 people. If you choose not to kill him, he would still kill 20 people, but you would not be held responsible for those 20 deaths for not killing the man who would have killed 20 people.
However, even though it is still technically wrong for you to kill that man who would kill 20 people, you would be doing a wrong thing for a right purpose. To take one man's life to prevent other lives being taken is still wrong, but the out come of taking his life is better than allowing him to take others lives.
Simply: Is it still morally wrong to take his life? Yes.
Is it Judicially or legally wrong to take his life? Depends, but probably no.
Soldiers deal with this all the time. Sometimes, you have to take a life to save lives, but that doesn't mean taking that one life is inherently right. It means it is a necessary choice, either to kill or not to. Not everything can be classified as right and wrong, morally, because sometimes it may be legal, and yet be wrong, or illegal, and be right. Is morality relative? No. It may seem that way, but just because the results of an action are more favored than another action, doesn't make it inherently right.