Yoga is meant to achieve communion with the Supreme. One of the limbs of Astanga yoga (Yoga-asanas) can be used to cure and prevent diseases of human body. It will help prevent and manage its occurance. For preventing an ailment or keeping yourself fit, you could practice yoga-asanas yourself after understanding the basics of Yoga. However if you are practicing yoga-asanas for curing a disease its better to work under the guidance of a Guru.