The hip flexor muscles are a group of 5 muscles that function in flexing the hip (in other words bringing the knee closer to the chest). Hip flexor pain has a wide variety of symptoms and pain patterns, so today I'm going to focus on the two most pain-inducing hip flexor muscles: The Psoas and Iliacus.
The Two Upper Hip Flexors: Psoas and Iliacus 
Hip Flexor Pain Anatomy
There are 5 major hip flexors in the body, and they can be broken into two groups: upper and lower hip flexors. The upper hip flexors (pictured above) are the Psoas and Iliacus muscles. These two muscles cause the most pain in my opinion, so they will be the focus of this post. The lower hip flexors connect from the hip to the knee and are named Tensor Fasciae Latae (TFL), Rectus Femoris, and Sartorius. The lower hip flexors can cause a lot of pain in the body as well, but each one has an independent set of pain symptoms that will be left for another post.
Tensor Fasciae Latae (TFL) Lower Hip Flexor Muscle
Upper Hip Flexor Pain Symptoms
The upper hip flexors, Psoas and Iliacus, are often referred to together because they tend to function and cause pain as a unit (sometimes referred to as the Iliopsoas complex). For simplicity I'm going to refer to the Psoas and Iliacus together as Iliopsoas during this portion.
The gruesome Iliopsoas pain pattern is felt in the upper thigh and lower back. This is due to the sheer strain the Iliopsoas muscles place on the pelvis and hips when tight. The image below shows the pain pattern of Iliopsoas trigger points and tightness in bright red. Keep in mind that this pain pattern is just for one side Iliopsoas tightness, but both sides are generally tight together .
Iliopsoas Hip Flexor Pain Pattern 
Upper Hip Flexor Pain Triggers
Iliopsoas hip flexor pain is no accident. Unfortunately, hip flexor pain is incredibly rampant in today's sedentary age and most people have absolutely no idea.
The main hip flexor pain mechanism is excess sitting. When sitting in chairs, the Psoas and Iliacus muscles shorten drastically. Sitting in this position for 8, 10, 12 hours a day puts a ton of strain on the hip flexor muscles, pelvis, and lower back. The majority of society does this day in, day out - creating an insane amount of tightness and pain that appears "non-specific" or "random" or "just part of getting old". Without attention paid to hip flexor pain and tightness, it is very easy to fall into this unfortunate pain pattern.
Another hip flexor pain trigger is performing a high-impact movement that the body is not conditioned to handle. For the hip flexor muscles, which function in lifting the knee to the chest, this can look like breaking into a sprint for the first time in years, hiking up a steep incline, walking up a lot of stairs, or doing any other activity straining the hip flexor muscles. This is typically a quicker trigger of pain than the sitting mechanism - you will likely know same day whether or not you messed up.
Hip Flexor Pain Relief
The concept to double down on in relieving hip flexor pain is to relieve the tension in the hip flexor muscles. The best method to do this is a) deep tissue massage, and b) stretch, in that order. The reason we want to start with deep tissue release first is because many knots and trigger points are not stretchable. We first need to smash all of the knots, tightness, and trigger points to get some slack in the muscles before moving forward with the stretches.
How To Massage The Hip Flexors: The best way to release the Psoas and Iliacus muscles via deep tissue massage is by using a purposefully made tool like QL Claw. QL Claw was designed to release the 5 major muscles that contribute to lower back pain when tight, and Psoas and Iliacus are high on that list. Check out QL Claw and how to release the hip flexor muscles at the links below:
How To Stretch The Hip Flexors: After thorough massage, it can be beneficial to lengthen the hip flexors to further improve mobility and pain relief. Check out the stretching walkthrough below for 2 great hip flexors stretches for pain relief:
 Donnelly, Joseph M. Travell, Simons & Simons Myofascial Pain and Dysfunction: the Trigger Point Manual. 3rd ed., Wolters Kluwer Health, 2019.