He takes a stick and attacks Ralph while Ralph is unarmed.
Ralph is elected chief during the very first meeting, which happens very early in the book.
Ralph is elected as the chief but Jack assumes the role of chief of the hunters.
During the first meeting, which was held in chapter 1: The Sound of the Shell, Ralph was elected as the chief. Later in the book Jack formed his own tribe and appointed himself as chief.
He puts Jack in charge of the choir and asks Jack what he wishes them to be, to which Jack replies "Hunters."
Ralph is elected as the chief but Jack, no longer content with just controling his hunters, later apoints himself as a rival chief.
The islanders unanimously vote for Ralph, to Jack's disdain.
Ralph assumed the role of chief to start out with after he was elected by the other boys. Jack was always power hungry and eventually started his own "tribe" in which he was the chief.
When Ralph is elected to be chief he knows Jack is dissapointed (as Jack also wished to be chief) so he appoints Jack as leader of the choir and asks him what he wants them to be, to which Jack replies, "hunters."
Jack wants power and Ralph, as the elected chief, has it. People tend to judge other people by their own motives. So, even when Jack manages to seize power and become chief of his tribe of savages he can't believe that Ralph would be prepared to accept this. He fears that Ralph will act as he would act himself and will eventually regain control. For this reason Jack wants to destroy him. As far as Jack is concerned while Ralph remains alive he will always be a threat to his authority.
Jack
Ralph reclaims his position as chief by uniting the boys against Jack's tyranny, appealing to their sense of civilization and order. He also uses Piggy's intellect and wisdom to present a strong case against Jack's rule, ultimately winning back the majority's support.
Ralph, Jack, and Roger are very frightened when they finally see the beast.