Warriors seem to have been present in the earliest pre-state societies. Along with hunting, war was considered to be a definitive male activity. No matter the pretext for combat, it seemed to have been a rite of passage for a boy to become a man. Warriors took upon costumes and equipment that seemed to have a symbolic significance; combat itself would be preceded by ritual or sacrifice. Men of fighting age often lived apart in order to encourage bonding, and would ritualise combat in order to demonstrate individual prowess among one another.  Most of the basic weapons used by warriors appeared before the rise of most hierarchical systems. Bows and arrows, clubs, spears, and other edged weapons were in widespread use. However with the new findings of metallurgy, the aforementioned weapons had grown in effectiveness. 
When the first hierarchical systems evolved 5000 years ago, the gap between the rulers and the ruled had increased. Making war to extend the outreach of their territories, rulers often forced men from lower orders of society into the military role. This had been the first use of professional soldiers —a distinct difference from the warrior communities.
The warrior ethic in many societies later became the preserve of the ruling class. Egyptian pharaohs would depict themselves in war chariots, shooting at enemies, or smashing others with clubs. Fighting was considered a prestigious activity, but only when associated with status and power. European mounted knights would often feel contempt for the foot soldiers recruited from lower classes. In Mesoamerican societies of pre-Columbian America, the elite aristocratic soldiers remained separated from the lower classes of stone-throwers. 
In contrast to the belief of the caste and clan based warrior who saw war as a place to attain valor and glory, warfare was a practical matter that could change the course of history. History always showed that men of lower orders who, provided that they were practically organized and equipped, almost always outfought warrior elites through an individualistic and humble approach to war. This was the approach of the Roman legions who had only the incentive of promotion, as well as a strict level of discipline. When Europe's standing armies of the 17th and 18th centuries developed, discipline was at the core of their training. Officers had the role of transforming men that they viewed as lower class to become reliable fighting men. 
Inspired by the Ancient Greek ideals of the 'citizen soldier', many European societies during the Renaissance began to incorporate conscription and raise armies from the general populace. A change in attitude was noted as well, as officers were told to treat their soldiers with moderation and respect. For example, men who fought in the American Civil War often elected their own officers. With the mobilization of citizens in the armies sometimes reaching the millions, societies often made efforts in order to maintain or revive the warrior spirit. This trend continues to the modern day. 
Due to the heroic connotations of the term "warrior", this metaphor is especially popular in publications advocating or recruiting for a country's military.
While the warrior class in tribal societies is typically all-male, there are some exceptions on record where women (typically unmarried, young women) formed part of the warrior class, particularly in pre-modern Japan.
A purported group of fighting women is the legendary Amazons, recorded in Classical Greek mythology. Similarly, the Valkyries are depicted in Norse mythology, particularly the Icelandic Etta. During the Viking Age a type of female warrior was the skjaldmær, or shieldmaiden. Hard historical evidence of non-mythological female warrior classes have been harder to come by, but some studies have been done (e.g. Birka warrior). However, groups of female warriors typically belong in folkelore and mythology, rather than in reality where there were only exceptional cases of women engaging directly in combat roles.
A 2017 study led by Charlotte Hedenstierna-Jonson produced DNA results confirming the remains excavated in Birka, Sweden, were a female warrior. However, prominent historian and viking specialists, such as Judith Jesch, have disputed the findings, calling their thinking "sloppy" and citing issues of academic validity, including referential errors, a lack of involvement from linguistics experts, and no physical evidence that the skeleton in question actually engaged in any battle. Meanwhile, archaeologist Anna Kjellström, who worked with Hedenstierna-Jonson on the initial study, voiced her own doubts claiming it was clear the "material and the contextual information given... did not match the data".
^D'A. J. D. Boulton, "Classic Knighthood as Nobiliary Dignity", in Stephen Church, Ruth Harvey (ed.), Medieval knighthood V: papers from the sixth Strawberry Hill Conference 1994, Boydell & Brewer, 1995, pp. 41–100.
^Frank Anthony Carl Mantello, A. G. Rigg, Medieval Latin: an introduction and bibliographical guide, UA Press, 1996, p. 448.
^Charlton Thomas Lewis, An elementary Latin dictionary, Harper & Brothers, 1899, p. 505.