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.  The samurai were the hereditary military nobility and officer caste of Japan from the 12th to the late 19th century.
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 folklore and mythology, rather than in reality where there were only exceptional cases of women engaging directly in combat roles.
Women warriors in viking society has also been a recurring subject seen in many old viking sagas and depictions. This was also reinforced by a found in BirkaSweden when a 2017 study led by Charlotte Hedenstierna-Jonson produced DNA results confirming the remains excavated in Birka, Sweden, were a female warrior. This find was met with some criticism mainly because of old and outdated understandings of viking society and the gender roles of Norse society. However this criticism was later debunked when scientific methods proved the warrior was in fact a woman and was a warrior based on the location and items of the burial.
In a new study the researchers of the original study have reaffirmed their conclusion that this mighty individual was a woman. The new study addresses all the questions people raised, and more. Genetic analysis revealed that the bones had XX chromosomes which invalidates Jesch's criticisms. She was buried in an area that "reinforces a warrior interpretation -- being situated outside the gate of the Birka hill fort and adjacent to two other burials containing numerous weapons," the researchers wrote in the study.
^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.