Initially, Jack paints his face in order to hide himself better from the pigs he's hunting. He concludes that the pigs can't smell him, but they can clearly see him as he stalks them, and so he needs a sort of camouflage.
Later, the mask takes on added significance because it hides Jack from the other boys as well. There is a wealth of symbolism in masks as a literary and cultural element, and most of them are employed here. The mask allows Jack to "not be Jack", so to speak; it frees him of his identity and all the restraints that go with it;
He capered toward Bill, and the mask was a thing on its own, behind which Jack hid, liberated from shame and self-consciousness.
The mask also represents a descent into savagery, in that a rational "civilized" person would not have to take on a persona or employ magic in order to accomplish a task, and the things Jack is liberating himself from are all generally considered to be good traits in a civilized relationship.