To bag a pig, you must have the appropriate Evil Pig Bag. When you have the appropriate Evil Pig Bag, the Pig Gate will magically appear and open in front of your eyes when you pass by it's location. Once inside the Pig Gate, you must jump on the Evil Pig's head and throw it into the spinning and/or moving Pig Bag which can be tricky. See the list of events for the locations of Evil Pig Bags and Evil Pig Gates.
-from Tomba! Players Guide FAQ