The knee is responsible for flexion and extension
The Hamstrings: Biceps Femoris, Semimembranosus,Semitendinosus and The Quads: Biceps Femoris, Vastus Intermedius, Vastus Lateralis, and Vastus Medialis are the muscles involved.Last but not least, the Popliteus is responsible for knee flexion also.
just to add to Susan’s answer:
The popliteus is also responsible for internal rotation of the tibia as well as for unlocking the knee joint when bending the knee from a fully straightened position.
The knee joint flexes and extends
Popliteus which is found behind the knee plays huge role in providing lateral stability to the knee. Vastus intermedius, extends the knee. Vastus lateralis, largest muscle group to the quadricep also is extension. Vastus medialis, knee extension part of the lower thigh.