Inverse Kinematics Not Working. Leg freaks out
To sum it up, here is how it should be organized:


In Edit mode, switch Lowerleg and Thigh directions (header menu > Armature > Switch Direction) so that it looks like in my picture.
Parent Thigh to Hip, parent Lowerleg to Thigh, parent Foot to Controller, deparent Controller, deparent Poletarget, deactivate the Deform option of Controller and Poletarget.
Bend the knee a bit forward.
In Pose mode give an IK constraint to Lowerleg with the Controller as Target and Poletarget bone as Pole Target. Correct the Pole Angle if it needs to.