Mercenaries are a very old phenomenon. They are mentioned in the Old Testament - King David had a bodyguard of Cretan and Philistine mercenaries. The Carthaginians often used mercenaries. The so-called Free Companies in the Middle Ages were mercenary companies which consisted of rogue knights and archers. The Japanese ronin were mercenary samurai.
For many years in the Middle Ages soldiers from Switzerland fought battles for whichever side paid them. The popes would hire soldiers from Switzerland to fight for them. The Swiss Guard is all that is left of Switzerland's mercenary tradition. However the modern Swiss Guard are not mercenaries, because the guards are all catholic and are prepared to fight not for their country but for their beliefs.
Soldiers of professional volunteer armies, like those of the US Army, are not considered as mercenaries as they fight for their country and fatherland. Likewise, foreign volunteers in standing armies, such as French Foreign Legion, are not considered as mercenaries as they are loyal to the country they serve. But various private military contractors are considered mercenaries.