Knee injury in yoga usually involves tearing the Meniscus, a double ring of cartilage between the Femur (thighbone) and the Tibia (lower leg bone) – either through carelessness – by practicing asanas with the feet and the knees pointing in different directions, or in Padmasana. It is also possible to overstretch the supporting ligaments at the sides of the knees. People also experience pain behind the knee, on the outer side of the knee, on the inner side below the knee or around the Patella (kneecap) itself.

Knee pain should never be ignored, in the hope that it will go away – the causes need to be investigated and dealt with before attempting any asanas that are painful. It is also highly risky to practice when there is swelling around the knees because swelling inhibits stabilisation by the muscles attached to the Patella and can lead to injury.
Students and teachers should take care to avoid this kind of injury because the majority of Meniscus tears require surgery and rarely heal by themselves because the blood supply to cartilage is very limited. Knee problems are complex because some kinds of knee pain comes from an actual injury to knee structures like the meniscus or ligaments, but most other knee pain is caused by instability of the hips, which can cause structural damage in the knee.
The Gluteus Medius is the main stabiliser of the pelvis and if it is weak the pelvis tilts to the side when standing on one leg, while the knee tends to sway inwards when it is bent, putting pressure on knee structures. Hip muscle imbalances also creates rotational stress which can cause injury in Padmasana. This is explained in more detail in Knees and Padmasana. The relationship between the hips and the knees is explained in more detail in How Hip Problems Cause Knee Pain and for more information on the Gluteus Medius, please read Lateral Pelvic Tilt in Yoga Practice
Another source of knee pain are the Quadricep muscles, this pain occurs mostly around the kneecap and in asanas like Virasana and is detailed in Pain at the Kneecap
Reading sources: Ellenbecker, De Carlo, DeRosa, 2009, Effective Functional Progressions in Sport Rehabilitation Sports Injury Bulletin: Meniscal Tears Sports Injury Bulletin: Knee Rehabilitation Sports Injury Bulletin: Popliteus