Pigs are considered to be smarter than 3-year-old human children.

They are known to have a great sense of direction and are able to find their way home from long distances. They are capable of abstract representation and have the ability to play simple video games! They perform better on these games than 3-year-old human children and many species of adult primates!

Surprisingly, they lead fairly complex social lives - mother pigs even have been known to sign to their piglets while they feed. They can dream, and they learn from watching each other.

They can also recognize the meanings of certain words, sometimes years after being taught them.

So far, though, there's no evidence that they can herd sheep. (You know, like Babe? Remember that movie? I\'m old.)
(Sources: 1, 2)