A soldier is a person who is a part of an army.
If people fight in irregular (not normal forces) armies not wearing a uniform, and not part of the official military (fighting group of a nation), they are called partisans if they fight against another nation's army, or terrorists, if they fight civilians.
Partisans and terrorists are less protected by the laws of war than soldiers.
Soldiers can be volunteers or conscripts. A conscript is a person who had been forced to become a soldier and fight.
Soldiers have existed for many years, dating back to ancient times.