I learned by doing aid climbing. I used to top rope a difficult A-1 and to choose a spot for my protection, use the best nuts or cam, remove it, place and other test it and remove it, and try a third one which is going to be the one I will climb on for the next step. As I load my protection, I look carefully how it work. A number of those pop out, but I saw how they rotate and, by learning that, I knew which one is bad, which one is going to fail. So, I know what is a bad placement.
As I do that exercise, I learned to place protection at many places and in many position. when I climb, i didn't see a single crack where I can protect myself, but numbers of good and bad placement and I have to choose between them.
I saw some people, sport mostly, who learned what is a good placement. The nut most be as solid as a bolt. when they look the rock, they saw few placement, which are obvious for the best placement. Often those placement are not even secure.
So, how do you learned and work out to be good at protecting a pitch and are you using all good nuts placement or are you avoiding the less good nuts placement?