"Cock of the walk" is a term that is traditionally used to refer to males who have a great deal of self-esteem and appear to enjoy a great deal of personal fortune at the present time. Typically, the term is reserved for people who are very much aware of their attributes and tend to parade those abilities and fortunes in front of others. This can often lead to those who observe the somewhat boisterous behavior with a bit of derision using the designation of "cock of the walk" to reduce the self-important one to the status of a rooster guarding a hen house.
The concept of a cock of the walk is grounded in the image of a rooster who has the job of watching over the hens in the hen house. Unchallenged in his role in the barnyard, the rooster will often strut about with what humans sometimes perceive as a great deal of pomp and circumstance. When humans act in a similar manner, the term is usually employed to call attention to the ridiculousness of the performance, noting that there is nothing so special about the individual that he or she is automatically above reproach.
While "cock of the walk" has generally been used as a term to refer to self-aggrandizing males, it has in recent years become equally common to use the idiom when referring to people of both genders who exhibit traits and attitudes that convey they are somehow superior to others. A cock of the walk may refer to a prominent businessperson, an educator who considers his or her knowledge and prowess in the classroom to be superior to the abilities of others, and even to individuals within certain social settings who consider themselves to be a little better than their peers.
It is important to note that while "cock of the walk" can sometimes be used in jest, as a means of poking fun at someone who has enjoyed a bit of good fortune and is currently reveling in that fortune, it is more commonly employed when someone seems to think he or she is above others in the immediate area. From this perspective, being a cock of the walk is not a particularly desirable characteristic, since others are more likely to take some amount of glee in the downfall of that person. This means that people will often attempt to avoid being labeled in this manner, sometimes by taking care to note how much they owe to others as they continue to pursue their dreams and achieve some measure of success.