The end of the novel also highlights Ralph's confusion about society itself. He struggles to reconcile what he knows of school - the rules, the structure, the discipline - with what he knows of the world - violence and war. Although uncomforable with Jack's violent treatment of some of the boys, Ralph hesitates to contradict him because it appears normal to him. It is when the naval officer stumbles upon him and comments on the "play" of the boys that Ralph understands society. He weeps then for the "end of innocence" and the "darkness in men's heart". He realizes that the discipline of society is barely covering up its true, violent nature.
Ralph is one of the most complex characters in this novel. Internally, he struggles between his accepted leadership and his actual age. As the elected leader, he feels the responsibility of both keeping them together as a civilized society (hence his attempt at shelters, bathrooms, etc.) and of getting them rescued (his obsession with the fire). However, as a kid, he envies the other boys, Jack especially, because of their ability and willingness to shun responsibility and just have fun. This is seen most pointedly during his argument on the mountain with Jack after they missed their chance to be saved the first time.
Ralph's external battles are mostly related to that same idea. He fights (physically, mentally, and emotionally) with Jack about what the boys should be doing. He recognizes Piggy as an outsider and pokes of him for that. He also must defend his actions against all of Jack's tribe once they abandon reason. Ralph has some obvious conflict with the elements of nature, also, but their importance pales in comparison to his relationships with the other characters.