The term “pearls before swine” comes from the Sermon on the Mount, a famous speech given by Christ to his disciplines. It means that people should not waste pleasant or good things on people who will not appreciate them. The meaning of this phrase in the Sermon on the Mount is a topic of much debate among religious authorities, with some people believing that it simply means that Christians should only preach to a receptive audience, while others suspect that it specifically refers to the Romans, and other theories also abound.
In any case, “pearls before swine” is sometimes also seen as margaritas ante porcos, which means the same thing in Latin. Christ Himself, of course, would have said it in Aramaic, and in fact some people believe that the “pearls” in this phrase may have been mistranslated from the Aramaic, suggesting that Christ used a different word in this now-famous saying. Given that people have been talking about casting pearls before swine for two thousand years, a new translation is likely to meet with a frosty reception.
In the time of Christ, pigs were regarded as unclean animals in the Jewish faith, so in a sense, the term refers to giving great things to beings which are not worthy. The fact that pearls would be essentially useless to pigs has also been pointed out, as the term illustrates that it is rather foolish to give things to people who cannot or will not use them. Pigs are unlikely to realize the value of pearls when they see them, so tossing pearls to swine would really just be a waste.
There are all sorts of ways to use this idiom, and it has become so widespread that comic strips, books, and songs have been named after it. Many people use the term to talk about someone who doesn't appreciate the value of an item or another person, as in “George asked her out on a date, but it was like tossing pearls before swine.” Some people also use this term in a resentful sense, suggesting that they offered or gave someone something superb, and ended up being snubbed.
This idiom is also used to imply that someone is uncultured or unworthy, with the swine being the great unwashed masses, while the pearls are some superb and excellent offering. Many people who attempt to enact social change find themselves frustrated by the pearls before swine phenomenon, struggling to understand why people reject their proposals and ideas when they hold so much promise.