Ralph did not always represent the good in the novel Lord of the Flies by William Golding. Although we tend to associate the conflict between the two boys in terms of good and evil, the reality in the text is much more blurred. For example, when Ralph first meets Piggy, he is not good or spiritual; enough to recognise the good (priceless) qualities of this new potential friend. a true friend is one of the most precious things we can be lucky enough to attain in life, yet when the other boys come along, Ralph spurns Piggy. He even joins in with the evil derision by betraying Piggy's trust and telling the boys his nick name. So the whole book is about conflict - the inner conflicts of the individual as well as the outer conflicts between individuals
I guess you could say that there is conflict on two levels. On the literal level (what is actually going on in the book) the two are in conflict because they both want to lead the group of boys. They also do not agree on what is most important -- hunting or building huts and trying to get rescued.
On a more figurative level (symbolic), Jack is the dark side of human nature. He is in conflict with the part of human nature that wants to be civilized and do good things.
In the book Lord of the Flies Ralph is appointed leader by the boys whn they land on the island. Jack felt that he should have been the leader because he is the leader of the boy's choir. It is their first conflict.
Later Jack becomes more savage. He desires to be the hunter and make a kill. As he exerts his power through his ability to hunt and kill, the other boys are drawn to him. He maintains his power through his savage behaviors and bullying. He is essentially the evil of man.
Ralph tries to maintain dignity and compassion despite the trials of living on the island. He slowly loses control of the boys as their leader. Ralph is the good side of mankind and he wants to continue to have order and civilized behavior.