A flying pig is a symbol of an impossible event coming to pass. The popular saying "[it will happen] when pigs fly" (or when pigs have wings) is traditionally used to mean that the specified event will never occur.
"When pigs fly" is an idiomatic way of saying that something will never happen. Pigs are heavy animals, without wings, and cannot possibly fly. So "when pigs fly" is a time that will never come. The phrase is used for humorous effect to scoff at someone's intentions to achieve or carry out something which is beyond their previous efforts and accomplishments, especially in politics. There are numerous variations on the theme; when someone with a reputation for failure finally succeeds, onlookers may claim sarcastically to see a flying pig. "Hey look! A flying pig!"
Similar phrases include "when hell freezes over"