Combatant

Combatant is the legal status of a person entitled to directly participate in hostilities during an armed conflict, and may be intentionally targeted by an adverse party for their participation in the armed conflict. Combatants are not afforded immunity from being directly targeted in situations of armed conflict. The legal definition of "combatant" is found at article 43(2) of Additional Protocol I (AP1) to the Geneva Conventions of 1949. It states that "Members of the armed forces of a Party to a conflict (other than medical personnel and chaplains covered by Article 33 of the Third Convention) are combatants, that is to say, they have the right to participate directly in hostilities." Consequently, on the other hand combatants, as a rule, are legal targets themselves for the opposite side regardless the specific circumstances at hand, in other words, they can be attacked regardless of the specific circumstances simply due to their status, so as to deprive their side of their support.
In addition to having the right to participate in hostilities, combatants when captured as prisoners of war or hors de combat are automatically granted the status of protected persons during an international armed conflict. "While all combatants are obliged to comply with the rules of international law applicable in armed conflict, violations of these rules shall not deprive a combatant of his right to be a combatant or, if he falls into the power of an adverse Party, of his right to be a prisoner of war."
Distinction between combatants and civilians
The requirement of distinction between combatants and civilians lies at the root of the jus in bello. It is reflected in Article 48 of Protocol Additional I of 1977 to the 1949 Geneva Conventions for the Protection of War Victims, entitled "Basic rule": "the Parties to the conflict shall at all times distinguish between the civilian population and combatants and between civilian objects and military objectives and accordingly direct their operations only against military objectives."
Status of combatants
Under international humanitarian law (IHL, aka the rules of armed conflict) combatants may be classified in one of two categories: privileged or unprivileged. In that sense, privileged means the retainment of prisoner of war status and impunity for the conduct prior to capture. Thus, combatants that have violated certain terms of the IHL may lose their status and become unprivileged combatants either ipso iure (merely by having committed the act) or by decision of a competent court or tribunal. In the relevant treaties, the distinction between privileged and unprivileged is not made textually; international law uses the term combatant exclusively in the sense of what is here termed "privileged combatant".
If there is any doubt as to whether the person benefits from "combatant" status, they must be held as a POW until they have faced a "competent tribunal" (Article 5 of the Third Geneva Convention, GC III) to decide the issue.
Privileged combatants
The following categories of combatants qualify for prisoner-of-war status on capture:
Members of the armed forces of a Party to the conflict as well as members of militias or volunteer corps forming part of such armed forces.
Members of other militias and members of other volunteer corps, including those of organized resistance movements, belonging to a party to the conflict and operating in or outside their own territory, even if this territory is occupied, provided that they fulfill the following conditions:
that of being commanded by a person responsible for his subordinates;
that of having a fixed distinctive sign recognizable at a distance;
that of carrying arms openly;
that of conducting their operations in accordance with the laws and customs of war.
Members of regular armed forces who profess allegiance to a government or an authority not recognized by the Detaining Power.
Inhabitants of a non-occupied territory, who on the approach of the enemy spontaneously take up arms to resist the invading forces, without having had time to form themselves into regular armed units, provided they carry arms openly and respect the laws and customs of war; often dubbed a levée after the mass conscription during the French Revolution.
For countries which have signed the "Protocol Additional to the Geneva Conventions of 12 August 1949, and relating to the Protection of Victims of International Armed Conflicts" (Protocol I), combatants who do not wear a distinguishing mark still qualify as prisoners of war if they carry arms openly during military engagements, and while visible to the enemy when they are deploying to conduct an attack against them.
Unprivileged combatants
There are several types of combatants who do not qualify as privileged combatants:
Combatants who would otherwise be privileged but have breached the laws and customs of war (e.g., feigning surrender or injury or killing enemy combatants who have surrendered). The loss of privileges in that case only occurs upon conviction, i.e. after a competent court has determined the unlawfulness of the conduct in a fair trial.
Combatants who are captured without the minimum requirements for distinguishing themselves from the civilian population, i.e. carrying arms openly during military engagements and the deployment immediately preceding it, lose their right to prisoner of war status without trial under Article 44 (3) of Additional Protocol I.
Spies, i.e. persons who collect information clandestinely in the territory of the opposing belligerent. Members of the armed forces conducting reconnaissance or special operations behind enemy lines are not considered spies as long as they wear their uniform.
Mercenaries, child soldiers, and civilians who take a direct part in combat and do not fall into one of the categories listed in the previous section.
Most unprivileged combatants who do not qualify for protection under the Third Geneva Convention do so under the Fourth Geneva Convention (GCIV), which concerns civilians, until they have had a "fair and regular trial". If found guilty at a regular trial, they can be punished under the civilian laws of the detaining power.
See also
Non-combatant
Rule of Law in Armed Conflicts Project (RULAC)
References
Law of war
Combat occupations