A civilian in time of war is a person who is not a member of a country's military and any other fighting group. This is what the word means under the laws of war. Civilians are the opposite of soldiers and combatants, who fight in wars.
Civilians are protected by international law from being harmed during war. The treatment of civilians during times of war is covered by the Fourth Geneva Convention. Prisoners are covered by the Third Convention. These are based on humanitarian doctrines (ethical beliefs) and that most countries follow them as law.
Civilians have the right to defend themselves. If they participate in other fighting, they are usually called partisans, and they can be tried for war crimes.
The modern use of the word also has problems: