You can train your pig to use a litter box or to do their business outside in a short period of time. In general, you use the same techniques you would for a dog. Keep them in a small space at first, gradually making their area bigger. Take them outside or put them in the litter box after each feeding or watering and keep them there until they finish. Praise them (or give them treats) when they do what they are supposed to. Most of all, be consistent!
Teaching a pig tricks is actually quite easy. Remember, pigs are smart, they have great memories, and they love food.
Tape food to the item you want the pig to fetch (frisbee, ball, and so forth). Let them smell the item, and then throw it. When the pig goes after the item and gets it, go to them and give them some food. Repeat a few times, and then wait for the pig to come to you for the food.
It is difficult for a pig to sit on their hind quarters and beg. However, they can lift their front feet into the air for a short period of time. Simply hold the food above their head until the feet come off of the ground and then give it to them. You can gradually increase the time between when their feet come off of the ground and when you give them the food.