Ironically Yoga was created as one of the most disciplined arts and was hand in glove with nerve-wrecking penance. That's what most people who want to do yoga miss nowadays, they don't really know what it was for , they just get into it because it's easy, and that ends up being a big mistake because it was made to not be easy.
Also funnily enough, even if people practice yoga on their own, it was developed with the inherent fail-safe of body pain in mind, so it wouldn't harm them. However nowadays you have expert teachers who push you beyond your body's limits and that's truly dangerous.
So to sum up, if you want to get into Yoga, get a good book and do it on your own. OR Make sure you find a really really good teacher and do a thorough check before joining a class, and don't just enter into a Yoga program on a whim.
Those are the only two ways I see to stay safe, and still benefit from learning Yoga.