See A-Z of rehabilitation exercises
In case you cannot see the video, here is a still sequence -

The hip external rotation exercise helps to strengthen your hip muscles.
Lie on your side with your head supported by your hand and your elbow on the pillow.

Lift the top leg so that the feet are a handsbreadth apart.

Maintain the feet in this position while you roll the top knee outwards, opening the space between the knees.

Relax back into the starting position, keeping the feet apart and the knees apart.

Repeat the external rotation from this abducted position...

...5 times. Change sides and repeat the sequence another 5 times.