Yoga is usually taught in a class, but you may prefer to do it on your own at home. There are many excellent YouTube channels that cater from beginners all the way to an expert level.
If you decide to start with a class then It's a good idea to try some different types of yoga to see which ones you like best. If you're looking for a workout, heated vinyasa or Ashtanga could be up your alley. But if you're after something a little more chilled, hatha or yin might be more your speed.
When you're starting out, find a teacher who demonstrates poses and cues alignment clearly. This doesn't always happen in more advanced classes, where students have been practising for a long time and understand alignment.
Also, in large group classes, it's difficult to cater to everyone.