The patella is a bone within a tendon - the tendon of the long quadriceps muscle that spans the region from the hip to the shinbone.
The illustration on the right shows one part of the quadriceps muscle in its entirety (the rectus femoris part), and you can see the patella situated within its tendon just at the knee joint. It is unsual in the body for a bone to reside within a tendon like this, so the patella is special.
The rectus femoris muscle attaches at its upper end to the pelvis and the top of the femur (thighbone), and at the lower end to the tibia (shinbone) at an important lumpy spot about 1.5 inches below the bottom of the patella - the 'tibial tubercle'.
We have left out the other three parts of the four-headed quadriceps muscle to make the illustration easier to understand.
This image on the left (an MRI scan with reverse contrast) is looking at the knee from the side. One can see how the patella is really part of the tendon of the quadriceps, and the point at which the tendon attaches to the tibia bone at the tibial tubercle.
The bit of tendon below the patella is called the patellar tendon, and the bit above it is called the quads tendon (or quadriceps tendon), but it is really all one structure. Note also the relationship of the fat pad to the patella - this is a wad of fatty tissue that fills the space below and behind the patella.
The trochlear groove is the groove in the femur bone along which the patella glides when the knee is bent and straightened. You an understand this best if we illustrate it from above, as if you were seated and looking down at your toes. Usually the outer (lateral) wall of the groove is higher than the inner (medial) wall, and the patella is contained within these walls.
The Fibrous Restraints
Because the patella also has fibrous tethers on its sides (the medial and lateral patellofemoral ligaments, and the medial and lateral retinaculae), these may become torn if the patella dislocates. On the lateral (outer side) is a tight area called the 'lateral retinaculum' and it tends to restrain the patella on the outer side, usually counteracted on the medial side by the medial patellofemoral ligament and a strong quads muscle, especially that portion of it known as the VMO. The medial capsular structures are less tight, so if the VMO becomes weak there may be a tendency for the patella to be pulled to the lateral side. The medial patellofemoral ligament (MPFL) is an important restraint that becomes damages after patellar dislocation.
When talking about the mechanics of the patella, doctors often refer to the 'extensor mechanism' - meaning the whole muscle/tendon/bone structure of which the patella is a part. ['Extension' means 'straightening', and the extensor mechanism is comprised of the bones, muscles and tendons which act to straighten (extend) the knee, the main extensor muscle being the quadriceps muscle.]
The Q angle
Anatomical conditions affecting the extensor mechanism and tending to pull the patella to the outer side include a twisted femur (femoral torsion) or a tibial tubercle which is too far over to the outer side. A measure of the likely stress on the patella is the 'Q-angle' 'quads' angle. The bigger this angle, the greater the force trying to pull the patella to the outer side, and the restraints and the trochlear groove are not always sufficient to keep the patella where it should be.
Normally, when the knee is straight (extension) the kneecap sits at the shallow section of the trochlea. As the knee flexes ('bends'), it is pulled into the deeper part of the trochlea at about 30 degrees of flexion, then runs centrally in the trochlear groove during the rest of bending. Should the walls of the groove be defective ('trochlear dysplasia') or the patella sit too high on the femur ('patella alta'), then the patella may sometimes come out of the groove, partially ('subluxation') or fully ('dislocation').