We raise about 8-10 piglets to market weight each year, and I have to disagree that you can't save money doing it. For the most recent batch of pigs we did, our total cost per-pig, including slaughter and butchering, was about $300. That's for approximately 135 lbs of meat in the freezer, or about $2.22 / lb average over all the cuts. The last time I surveyed the grocery store (which I do from time to time just to compare my prices to theirs), I came out at an average of around $3 / lb. So not only is my meat
worlds better than grocery store meat, it's cheaper too. That is, of course, if you don't count the value of my labor, which I don't, because raising pigs is more of a hobby than a business to me. And bear in mind that we just buy feed by the 50-lb bag at the TSC or the Co-Op, so we're not even doing particularly well on feed prices.
I agree with everything folks have said so far. I do know people who have raised a single pig all by itself, so it can be done. Pigs are very social animals, so they will get lonely and bored if they don't have company, but they're also very intelligent, and they don't absolutely require another pig to be their companion. Still, I would recommend if you're going to get one pig, get two, and find a friend to buy it off of you or have twice as much in the freezer when you're done.
Containing a pig will be a challenge. If you don't have experience with pigs, you may be surprised at how inquisitive and destructive they can be. We have had some pigs who showed less interest in escaping than others, but you should definitely over-engineer your pen. A full-grown pig can generate over 400 lbs of lifting force with its snout! Whatever you end up doing with your fencing, I strongly recommend putting a wire or two of electric fencing around the whole thing, at a height of, say, 4-6", and maybe 10-12". The electric will provide the motivation to stay away. The fence will provide a visual reminder of where the electric is, and will prevent the pig from just squirting forward through the electric when it gets shocked. Having a secure pen for the pig is doubly important if you don't have a strong perimeter fence, which you may not, depending on whether you have other livestock.
We use electric mesh net fencing for our pigs, and we find it to work very well, but it may be more money than you want to spend if you're just going to do the one pig and then move on to something else. A spool of smooth-wire and a small energizer should be able to be had for under $100.
With regard to feed, bear in mind that it's important that the pig get adequate protein, and especially lysine, or it will not grow well. Pigs with inadequate lysine grow slowly and put on lots of fat instead of muscle. Corn has lots of energy, but little protein. If you feed the pig a substantial portion of corn, you should supplement with a nutrient/protein concentrate. 0.1% lysine by weight is the minimum. We had one year where we were feeding the pigs half-and-half corn and grower/finisher pellets. The pellets had only 0.75% lysine, so by cutting it half and half with the corn, the pigs were only getting about 0.375% lysine. Holy cow! If you do feed corn, you will get better feed conversion by feeding cracked instead of whole corn, and by soaking the corn for 24-48 hours in an equal volume of water before feeding. Also, bear in mind that pigs will enjoy eating house scraps, vegetable leavings, and so forth, but their caloric need is so great that there is no way any household could generate enough of these scraps to make up a substantial portion of the pig's diet. Give the pig as much of a complete feed as it wants, and give it all the garden and kitchen scraps you like as treats.
We find that our pigs grow out from about 35 lb piglets to about 250-300 lb market-weight in between 4-6 months. You can track the pig's approximate weight using the tape-measure method (
http://www.thepigsite.com/articles/541/weighing-a-pig-without-a-scale) to help decide if it is growing fast enough and/or when to process it. Unless you get a slow-growing heritage breed, the pig should be constantly gaining, and if its rate of gain slows or stops, it usually indicates a health issue. For perspective, here's a chart of our last batch of pigs' weights. Bear in mind this is based on the tape measure, not a scale, so there is some inaccuracy, but it should give you an idea of the general trend.