This is a great question. Lord of the Flies, by William Golding, depicts what happens to a group of schoolboys when they are stranded on an island without any adults or other authority figures. The two boys who rise as leaders from the beginning are Ralph and Jack Merridew. While Ralph has no apparent leadership skills, Jack has proven his leadership as head of the choir (though the choir only votes for him under duress) and thinks he should be elected leader. When the boys choose Ralph instead, the rift between the two boys begins and will eventually widen into a chasm.
In the simplest terms, Jack and Ralph will never get along because they do not think the same way. Ralph's priority is keeping everyone safe and being rescued by keeping a signal fire going; Jack is consumed with hunting (killing the beast) and has no interest in using fire for anything other than cooking the meat from the pigs he kills. Jack is also consumed with eliminating anything--or anyone--who diminishes his authority. It is not surprising, then, that nearly every event that happens on the island will force the two boys farther apart rather than bring them closer together.
Ralph and Jack are together for nearly all of chapter seven, and almost everything they do or say demonstrates their growing animosity. Ralph participates in a pig hunt and understands the power it makes one feel; however, he also thinks about the rest of the group and show his concern for Piggy and the littluns who will be left alone in the dark. Jack, on the other hand, is single-minded in his obsession to kill.
Near the end of the chapter, as they search for the beast, Jack is in the lead but displays some hesitation (fear) which shames him, and he lashes out at Ralph.
Ralph sighed, sensing the rising antagonism, understanding that this was how Jack felt as soon as he ceased to lead.
“I don’t mind going,” said Jack hotly. “I’ll go when we get there.... Would you rather go back to the shelters and tell Piggy?”
Now it was Ralph’s turn to ﬂush but he spoke despairingly, out of the new understanding that Piggy had given him.
“Why do you hate me?”
The boys stirred uneasily, as though something indecent had been said.The silence lengthened.
Ralph, still hot and hurt, turned away ﬁrst.
Ralph finally realizes what Piggy has been trying to tell him and what Jack has made clear from the beginning: if he had the chance, Jack would get rid of (kill) Ralph. Even the common cause of hunting a beast is not strong enough to overcome that. The truth is that they do share a common enemy, the beast, and the beast is them. They will never be anything but enemies because of that.