After the boys gather on the beach shortly after the plane crash, they decide that someone must be elected leader in the absence of any adults. Jack is one of the obvious choices since he is the head of the choirboys. Ralph, being the other oldest boy on the island, becomes the other choice to oppose Jack. Although Jack thinks that "I ought to be chief," the other boys are more attracted to Ralph, in part because he holds the conch shell.
"Let him be chief with the trumpet-thing." (Chapter 1)
When the boys take their vote, "every hand outside the choir except Piggy's was raised immediately" for Ralph. After Ralph had counted the hands, he announced
"I'm chief then." (Chapter 1)