According to the Random House Dictionary, the term warrior has two meanings. The first literal use refers to "a person engaged or experienced in warfare." The second figurative use refers to "a person who shows or has shown great vigor, courage, or aggressiveness, as in politics or athletics."
In tribal societies engaging in endemic warfare, warriors often form a caste or class of their own. In feudalism, the vassals essentially form a military or warrior class, even if in actual warfare, peasants may be called to fight as well. In some societies, warfare may be so central that the entire people (or, more often large parts of the male population) may be considered warriors, for example in the Iron Age Germanic tribes or the Medieval Rajputs.