Knee pain can develop for all kinds of different reasons. One fairly common culprit is the IT band or the ilio tibial band. The IT band is a length of connective tissue that runs from the ilium of the pelvis to the tibia of the lower leg. There is a muscle embedded in it up towards the hip. This muscle, tensor fascia latae does what its name implies; it is the tensor of the outer fascia and it is meant to pull the hip out to the side, flex the hip and internally rotate the hip.
The gluteus maximus is an extensor that also externally rotates the leg. This big butt muscle has two insertions, one of them connects onto the femur bone of the leg where it draws the leg in (adduction) and the other connects into the IT band. With its upper connection on the IT band it pulls the leg out to the side (abduction) in a similar way to the tensor fascia latae.
The quadriceps muscle originates in three places on the femur bone (three vastis muscles) and in one place on the pelvis (rectus femoris) and then runs down the leg connecting on the tibia of the lower leg. The quadriceps muscle is a flexor of the hip with the work of rectus femoris while the vastis work to extend the knee. The IT band helps the quadriceps muscle stabilize the knee when in extension. When you walk or run the quadriceps muscle and the femur bone should track in line with the hip and the ankle. The knee should rotate ever so slightly to the inside to begin its lift up off of the ground.
The knee pain that develops as a result of IT band problems is usually on the outside of the thigh just above the knee. It is commonly referred to as IT band syndrome, or, IT band friction syndrome. Very often it is described as an over use injury. I agree that it is an over use injury but one due purely to posture and technique. The pain arises because poor posture forces the tensor fascia latae into exernal rotation and the knee tends to move to the outside with each step instead of to the inside. The friction is from the knee moving out rather than in.
The IT band which is affected by the action of the tensor fascia latae should internally rotate with each step we take when walking or running. The only way this can happen is if we figure out the correct position of the pelvis. In the picture above you see the IT band with the pelvis in two different positions. In our habitually tucked posture the IT band and the tensor facia latae are pulled into external rotation and the gluteus maximus is basically adducting at both of its insertions. This happens any time the legs are pulled forward from being directly under the pelvis.
This is all a little more complicated than I usually like to get but this section of the anatomy and its functional use hold the key to unlocking a lot of chronic aches and pain. We all tuck our pelvis leading to dysfunctional use of so many muscles. Running injuries most often arise from bad form. We usually run the way we walk and stand. A tucked pelvis takes the leg bones forward and out of line forcing the outer thighs to rotate backwards and away from the ability to execute basic things like walking and running correctly.