Yoga pigeon pose has several variations all of which can be used to stretch the hip in different ways.
In most variations the front knee is bent with the shin resting on the floor. The other leg reaches straight back.
One common problem beginners have in yoga pigeon pose is positioning the front knee. When viewed from the front, the knee is positioned so that the knee is to the outside of the same-side hip.
Another problem that beginners have is that they aren't able to push down with the front knee to help support the body. (It is an unusual position after all.)
I use the following hip lifting exercise to teach them how to use their front leg hip.
With the right knee forwards, hands on the floor in front of the body, and right hip on the floor, lean the body to the left far enough that the right hip comes off of the floor. Return to the start and then repeat a few times. (Shown above.)
Note the position of the front foot relative to the knee. For this exercise the front foot can be further back than the knee (close to the front of the hip.)
Then try to do this same action with the hands off of the floor. Now you have to use the muscles of the front leg to lift the pelvis. Lean your ribcage to the left and as you do so use your outer hip muscles to press the front knee down into the floor. Press down with enough pressure to lift your front leg hip. Then see if you can slowly lower the hip back down.
See if you can find the balance point. Lean your ribcage just far enough that you can easily use you leg to help lift your pelvis. Once you've lifted the pelvis try to make both sides of the pelvis level. Also, reach the rear leg backwards and point the back knee down. If using a mat make the back leg parallel to the long edge of your yoga mat.
In nearly all variations of yoga pigeon pose you can focus on pushing your pelvis back and down, away from your front knee. (Double pigeon is an exception.)
To give your pelvis room to sink back and down focus on pushing your back leg rearwards. Reach your rear most foot back.
As for the ribs, work at reaching your ribs forwards (away from your pelvis) or in the case of upright yoga pigeon pose, upwards, away from the pelvis. Work at creating space between the pelvis and ribcage and between the ribs themselves.
Do the same with the neck. Make the neck long by creating space between the head and the ribcage. (You could focus on drawing the ears away from the ribcage.)
Once you are able to maintain a stable foundation in upright pigeon pose you can experiment with taking the hands off of the floor and keeping them lifted. You can then add any of the following shoulder flexibility stretches.
Normally in down dog I teach yoga students to push their ribcage and pelvis back using their arms. I usually have them do this while inhaling and then have them relax their shoulders (while maintaining the shape of the pose) while exhaling.
In the laying down version of yoga pigeon pose you can do the same thing. Use your arms to help push your ribcage and pelvis rearwards.
I like to move into this pose slowly.
With your right foot forwards and your hips level from left to right, place your elbows on the floor. Stay here until comfortable (or less uncomfortable.)
You could push your forearms forwards, against the floor, and at the same time press your ribcage, pelvis and back leg rearwards. At the same time push your front knee forwards and downwards, into the floor. Slowly relax and then repeat.
If you are able, lower your chest to the floor by widening your elbows, and then reach your arms forwards. Keep a very slight bend in the elbows. Then straighten your elbows and use your shoulders to help push your ribcage backwards. Relax and repeat.
Remember to push your front knee forwards and down as you push back. The feeling may be like pushing your pelvis back away from your front knee.
As your pelvis sinks down keep it level from left to right.
To add weight to the hip stretch lift the back knee a little bit. The back foot can be flat on the floor or the toes can be tucked under. In either case press the foot down into the floor to lift the back knee.
To add even more weight lift your chin off of the floor and pull your ears forwards, away from your shoulders so that your neck feels long. To make the back of your neck feel open and long, look down and tuck the chin slightly into your chest.
The further forwards you have your front foot (increasing the angle between shin and thigh) the deeper the hip stretch when doing yoga pigeon pose.
I'd suggest that the deepest stretch occurs when you have your front shin parallel to the front of your mat so that the front knee is open to almost 90 degrees. This can be challenging (and painful.) So I like to work towards this foot position gradually.
For each variation try to keep the pelvis level from left to right. This can be extremely difficult when the shin is parallel to the front of your mat. So do the best that you can.
In the picture above I'm on my elbows so that you can see the changes in foot position. Start of on your elbows and then when comfortable, reach your arms forwards. If lifting the back knee, lift it slowly and carefully, so that you can stop if you feel any pain in your front knee.
Also, be careful with your front knee. In general I move into this position and out of it slowly and smoothly so that I can stop if I feel knee pain. Generally I can then adjust the position my my shin and the way that I am doing the pose so that my knee doesn't hurt. That can mean pushing my pelvis back away from my knee and also making sure that my front foot isn't flexed. (See this video on pigeon pose hip stretch for more.)
Yoga pigeon pose can be used as a preparation for other hip externally rotated yoga poses like lotus, and foot behind the head.