Yoga is amazing—even if you only practice for one hour a week, you will experience the benefits. If you can do more than that, of course, you will reap more advantages.
If you're a beginner, try practicing two or three times a week, for an hour or an hour and a half each time. But if you can only do 20 minutes per session, that's fine too. Don't let time constraints or unrealistic goals be obstacles—do what you can, and don't worry about it. You will likely find that after awhile, your desire to practice expands naturally, and you will find yourself doing more and more.
Can't make it to the studio very often? Although experienced teachers are an invaluable tool for the beginner, it's a great idea to practice on your own once you understand the basics. Building a home practice will allow you to go at your own pace, work on poses you need to improve, and be in an environment where you feel safe and comfortable. Can't remember more than one or two poses? Perfect! Do what you know, and add to your home practice as your yoga repertoire grows from the time you spend in class.