With respect to the knee (and most, if not all other joints of the body) there are muscles that only on the knee and there are muscles that act across the knee and other joints. You can get an overview of these muscles in knee anatomy for yoga teachers.
In a nutshell, the single joint muscles that work on the knee joint include the three vastus muscles (which are part of the quadriceps group), the polpliteus and the biceps femoris short head. The multijoint muscles that work on the knee and the hip joint include: tensor fascia latae, superficial fibers of the gluteus maximus, sartorius, gracilis, semitendinosus, semimembranosus and biceps femoris long head. Multi joint muscles that work on the knee and the foot are limited to a single muscle, the gastrocnemius.
Perhaps one of the most important things you can do with respect to keeping your knees healthy is learning how to stabilize the knee.
At the most basic level you could stabilize the knees by making them feel stiff. However, an important consideration is whether you are stabilizing the knee to resist rotation, or hinging (bending or straightening) or a combination of both.
Another important consideration is whether you are working from a stabilized foot and ankle or from a stabilized hip bone, or from a stabilized hip joint.
To find out more about the different knee stabilization options and the muscles that can create those different kinds of stability, read knee joint stability
For more on shin rotation and the muscles that cause it (and the muscles that you can use to stabilize against it) check out shin rotation
As mentioned, the three vastus muscles are part of the quadriceps group. They are single joint muscles that work to straighten the knee or to help it resist bending. These muscles all underlay longer muscles which I term the long hip muscles. And so as well as working on the knee joint, another possible function of these muscles is that of adding tension to the overlaying long hip muscles.
Read more about these single joint knee muscles in Vastus Muscles
For reasons why you have difficulty activating your quadriceps read: how to activate your quads.
The IT band is a band of connective tissue that runs down the outside of the thigh. It connects to the hip crest and from there reaches down to attach to the outside of the tibia just in front of the fibula. In so doing is passes over the vastus lateralis muscle. Two muscles that act on it from the hip bone are the tensor fascia latae and the superficial fibers of the gluteus maximus.
The IT band can be a source of knee pain where it inserts into the tibia. To find out possible solutions for IT band knee pain, read the IT band knee pain article.
For more on the IT band itself and how the muscles that work on it can be used to either rotate the shin or stabilize it against rotation (with other muscles), check out the IT band anatomy biomechanics article.
The long hip muscles are how I collectively refer to the muscles that work on both the knee and the hip joint. These muscles attach to the corner points of the hip bones. And they, bar one exception, attach to the inner and outer aspects of the lower leg bones.
These muscles can be very important for stabilizing the hip bone. But in addition, they are also very important for keeping the knees safe, both in normal every day use but also when doing extreme yoga leg positions like hero pose and lotus.
Find out more about the long hip muscles and get a taste of how you can use them effectively to help keep your knees healthy in theLong hip muscles article.
The stage was set for me to learn to fix my own knees when I damaged my medial collateraly ligament in a motorcycle accident. I've had various knee pains since then and a big part of fixing my knees, apart from time, has been learning to understand how the knees work but also learning to feel and control the muscles that act on the knees. Read more about both in medial collateral ligament pain
It's taken me a long time to fix my knees. Ideally the information in the articles above will help you work more efficiently at fixing any knee problems you have.
For simple exercises that include learning to feel and control a large portions of the knee muscles just mentioned, take a look at the Smart yogi PE program. PE stands for proprioceptive elements.
For myself, now that I can feel and control my knees and the muscles that work on them, the most important thing is using them. I do simple exercises where I can maintain focus on feeling my knees, so that I can prevent injuries from happening. I'll be writing more on the knees, but another important element to look at for better knee health is the lower back. I've written a lot on the various elements of the lower back (it includes the hip bones) and you may find that improving your ability to feel and control the muscles of your lower back makes it easier to look after your knees.
Ironically, the Smart yogi Proprioceptive Elements program also includes exercises for helping you to learn the muscles of your lower back also!
Now that I've got the attempted at sales out of the way, for some of the exercises that I used to keep my knees healthy, check out knee strengthening exercises. These include the general muscle activation instructions that I use in my classes (after first teaching students to feel those activations).
My youtube videos that relate to knee health and keeping knees healthy
Watching videos on youtube isn't everyone's cup of tea, particularly with the ads, but none the less, here's a collection of my youtube videos that detail the a fair few of the techniques I've used to deal with knee pain, check them out here leg and knee strength exercise videos.
Do painful knees prevent you from running? My Knees you can run on online course is designed to help you make your knees pain free. Read more about making your knees good enough to run on.