Both of these things -- they long hair and the painted faces -- are meant to represent wildness and savagery. The boys have been moving towards savagery and away from civilization as their time on the island has continued. They will get much worse, of course, but the title of this chapter is meant to show that they are going in that direction.
You can see this in this chapter, for example, in the place where Roger destroys the sand castles that the littleuns made and where he throws rocks at Henry (he doesn't hit Henry, showing he's not all the way savage).
In Chapter 4 of William Golding's allegory, Lord of the Flies, the boys have spent some time on the island, now. And, in contrast to the Victorian novel, The Coral Island in which the stranded boys conquer the savages upon the island, thus representing the victory of civilization over savagery; the boys stranded in Golding's novel succumb to savagery, and degenerate to a more atavistic form of humanity. This descent into savagery is represented by the shedding of clothing, the lengthy hair, and the painted faces, behind which they can attain anonymity and more easily perform their brutal acts.
Still, the boys retain some vestiges of civilization. For instance, Roger, described as a short, furtive boy, emerges from the trees above and watches Henry on the seashore; then, Roger stoops, picks up a stone, "that token of preposterous time," and bounces it to a space around Henry. At this point, he is still conditioned by society to not harm the boy, but he is beginning to lose this conditioning as the days pass. As he sees Jack, "a darker shadow crept beneath the swarthiness of his skin" while Jack smears on the clay and charcoal to mask his face from the pigs. Jack, "liberated from shame and self-consciousness" now tells the boys how to hunt the pigs. Golding writes that "the mask compelled them." That is, the savage nature exemplified by Jack overpowers the boys and they begin their degeneration into savagery as they shed the vestiges of civilization.
Certainly, when you take good, English Public School (in America that would be a PRIVATE school) boys who were sons of delegates, and ambassadors and choir members---and then you see them in long hair and painted faces?? The first impression is that, certainly, they are in a state of rebellion.
Such rebellion, however, is not a response to a method in place, but a response to a situation which they have no other option but to respond to as they would against a method in place...it is a very intimate way to look into the psyche of these children, and lets us realize how humans are always welcome to break the rules, because of our instinctive nature.
In the book The Lord of the Flies, the long hair symbolizes that time has passed on the island. The boys do not have the civilized tools to cut their hair and it is only Ralph who becomes upset at being dirty and not being able to cut his hair.
The painting of the faces starts out as boys playing a game but ends up a very real example of the line between civilization and savagery disintegrating. Ralph and his boys do not dawn the make-up, but Jack's tribe of hunters mark their faces even when they are not on a hunt.