What I made for Alice was specifically for making walking animations. By two joints I mean the hip and ankle. Animating the feet were part of this code, but the are not influenced by the IK Handle.
I teach a Maya intro course and we cover basic IK so that’s how I conceptualize it. The IK handle starts at the hip, skips over the knee joint, and ends at the ankle joint, where Maya places (in the object hierarchy) what it calls the End Effector.
The End Effector reports its position to the IK Solver, which in turn decides what angle to rotate the hip joint and the knee joint, in order for the limb to meet the end effector.
The are always two ways to solve, so the positive result of the quadratic equation is with the leg bending one way, and the negative result is with it bending the other (ouch). In Maya this can be controlled by positioning the Pole Vector, placing it out in front of your character, but the Pole Vector can also be keyed so you can have the knees wobble, etc.