Look for a tutorial about an IK leg setup, the knee control your talking about is called a pole vector constraint.