The three little pigs' mother decides it is time for them to leave home, and turns them out. She warns them to beware of the big bad wolf, and says that they must each build a house to protect themselves.
The first pig builds a house of straw. The big bad wolf huffs and puffs and blows his house down, and eats the pig.
The second pig builds a house of sticks. The big bad wolf huffs and puffs and blows his house down too, and eats him.
The third pig builds his house of bricks. The big bad wolf huffs and puffs, but cannot blow his house down. He tries to trick the pig into coming out, telling him of a field of cabbages ready for harvesting, and that if the pig meets him there at eight in the morning, they will be able to steal as many cabbages as they like. But the pig goes to the field at seven, steals the cabbages, and returns home safely. Finally, the wolf comes down the chimney to get at the pig, but the pig is ready for that too, with a large cauldron of boiling water on the fire. The wolf falls into the cauldron, the pig claps the lid on, and cooks and eats the wolf.
The three little pigs represent the way of faith, the way of works, and the way of insight. The pig who builds his house of straw is ignorantly going through the motions of building a house, but his faith in what he is doing is of no avail when the wolf calls to test him. The pig who builds his house of sticks puts some real effort into it, but he still does not know the proper way of building a house and fares no better. The pig who uses bricks has understanding, as further demonstrated by his resourcefulness in his subsequent dealings with the wolf. Understanding does not obviate works or faith, but requires them: the third pig has a harder job than the others to build with brick, and must be confident that he knows what he is about in order to complete the task, far more so than one who thinks he need only stack sticks or sweep straw.
The third little pig's understanding does not stop at building the house that his mother advised. A house will serve a certain function very well, but it is an error to depend on it for tasks outside that function. The pig defeats all the wolf's stratagems by applying appropriate means in each case, so as to not merely remain safe, but to prosper.
The pigs' mother represents the teacher. There comes a point at which teaching in a school must end, and real learning must begin. This is the point at which the pigs' mother sends them out into the world.
The wolf also represents the teacher, testing whether the students have learned how to learn. He (metaphorically) destroys unworthy students, and is "destroyed" by the true seeker after truth, who having learned what the teacher has to teach, has no further need of him. He appears as a figure of terror who would kill the pigs; even so does the authentic teacher appear to the ignorant.
There was a fourth pig who stayed at home, and achieved nothing, which is why he is never mentioned in the story.