Shoulder muscle consists of three heads. That is the inferior in the front, the lateral or middle head and the posterior or rear head. The posterior head is the one that is neglected the most. So I am going talk about that muscle. The origin of the muscle is at the back of the scapula and the insertion is at the back of the humerus. The function of the muscle is to pull your arm backwards.
I would like to highlight some of the most common mistakes I have seen in the gym. I will give you some ideas how to avoid them.
One of the most popular exercises for this head is rear delt dumbbell fly. The vast majority of people tend to perform this exercise engaging the traps and the rhomboids too much. The function the traps and the rhomboids are to adduct the shoulder blades. I will give you few bits of advice on how to isolate the rear delt when performing this lift. First, use a partial range of motion. Start and finish the movement with slightly spread arms. That way you can focus more on the rear delts but you have to use lighter weights as you will find the movement is much harder to control. Second, instead of bringing your arms back make sure to keep your arms straight and squeeze out. If you have any back problem or you want to avoid unnecessary strain on your back you can use an incline bench.
If you want to achieve a good range of motion you can perform a crossover. You can do both standing or bend cross over, two arms or single arm. Make sure to focus on the rear deltoid instead of traps and rhomboids. Also, make sure to maintain a good posture through the whole range of motion.