There are so many varieties of Yoga and many of them can be modified to the practitioner's physical requirements and goals. For many people, taking a class from an experienced instructor is definitely the way to go. But for others, a researched home practice can be just as effective. For anyone who's considering starting out on their own, do some homework first.
Personally, I'm not comfortable going to a gym or Yoga studio. But over the last several years, I've developed several asana series on my own using Yoga Journal magazine and an assortment of books, and I choose the series I do depending on how I feel that day both physically and mentally. I'm far from being an advanced practitioner. For instance, I wouldn't attempt Headstand without an instructor because I have neck and shoulder issues, and I may seek out a teacher one day to learn how to do it safely. But I've definitely come a long way on my own.
I say this not to refute any of the advice above because it's very good advice, but to reassure anyone who thinks they'd prefer to start off on their own. Again, do some research. Learn about the various types of Yoga and the possible modifications that you can use. And ease into the practice, starting simply and paying close attention to how your body responds. You may end up heading straight for the nearest class, or you may develop a wonderful, personal, home practice.

