Why does my right knee turn in toward my left leg I have to turn my right foot outward to make my knee look straight my hip has also pops when walking?

Xs foot pronation. Excess pronation of the foot at the midtarsal ANS subtalar joints occurs simultaneously with internal rotation of the rest of the leg and hip. This places excessive pulling and strecthing on the medial soft tissue structures.
See a physician. If you are having pain when walking, see your local podiatrist to be evaluated. If your hip is hurting when it pops, you should also see an orthopedist.