The TFL is a small muscle located near to the side of the upper hip, and its function is to lift the hip to the side (hip abduction), bring the hip to the front (hip flexion), medial rotation of the hip (where you turn the leg inwards so that foot face to the middle part of the body). It's main presence is in providing stability and balance to the hip during walking/running and also standing.
This muscle tends get overworked and tight, and thus affects the proper balance and stability function; and therefore contribute to pain issues in areas like the knee, back and hip.
To relieve the tightness of this muscle, do consider combination of stretches and massage. Try some of these here:
Stretches (* there are quite a few stretches vid in youtube; I personally choose some of these which I personally feel it works better):
1st Vid (The narrator here describes with good example of your 'jeans pocket' to show exact location of TFL; kindly note how the narrator illustrate the difference between shifting hip forward which might cause the stretch aim towards the psoas)
https://www.youtube.com/watch?v=sS7cYp4Z2kk
2nd Vid (same narrator, though more detailed, and to pay attention if you experience knee pain; however my personal additional opinion, if you already have serious pain, consult a sports doctor or injury rehab professional too):
https://www.youtube.com/watch?v=5nagbeOYtoM
3rd Vid (Simple lying alternative, narrator also include other areas, eg. Hip flexor)
https://www.youtube.com/watch?v=HsM64G546-0
Self Massage:
https://www.youtube.com/watch?v=KjXOc4fF3Ao
Massage Therapist help (therapist also include quads and other hip areas)
https://www.youtube.com/watch?v=fjeZw5m4n1o
*** Important: If you are already suffering from bad knee pain, please seek professional medical attention… The mentioned stretches and relief techniques, though are good injury prevention tips, but may not provide a guarantee of cure if you are seriously injured, and might even complicate the injury for some cases.