A warrior is a person habitually engaged in combat. In tribal societies, 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, the male population) may be considered warriors, for example the Maori or Germanic tribes.
A pre-modern soldier is also called a warrior. The word warrior implies one who is not part of a full-time army. Without strict hierarchial discipline constantly being imposed on them, warriors in pre-modern societies were often guided by societal warrior codes.
Professional warriors are people who are paid money for engaging in military campaigns and fall into one of two categories: Soldiers; when fighting on behalf of their own state, or Mercenaries; when offering their services commercially and unrelated to their own nationality. The classification of somebody who is involved in acts of violence may be a matter of perspective, and there may be disagreement whether a given person is a hooligan, a gangster, a terrorist, a rebel, a freedom fighter, a mercenary or a soldier.