The sow's head in Lord of the Flies is both a literal and figurative element in this novel. Literally, it is the head of a dead sow which Jack has his hunters prop up on a stick as a kind of sacrifice to the "beast" on the island. Jack is reasonably sure there is no particular beast to appease, but his hunters are not so sure. He directs them to leave this sacrifice in order to help them feel more at ease on the island, as if this gesture could protect them from evil. It is literally just a gory head from a sow which has been placed on a stick.
The placement of the head is fortuitously close to Simon's secret "hideaway." When he goes there after the head has has time to draw a fog of flies (though its very existence is unknown to him), Simon has one of his fainting spells and the head appears to talk to him in a vision. Figuratively, the sow's head becomes the Lord of the Flies, taunting and threatening Simon about revealing the truth--that they are the beast. Simon understands this, and the pig head tells him no one will listen to him and warns him not to tell the others what he knows or he will die.
This is exactly what happens shortly after, of course, so the Lord of the Flies acts as a foreshadowing of things to come, as well. Golding himself intended this awful figure to be indicative of Satan and the worst of our sin nature. It's an effective image, I think, if that was his intention.