Were they run similar to a modern day corporation (with a CEO accepting contracts)? Or were they still "employed" by the countries they came from and just fought for a different country?
It varies by what group you refer to, of course. There have been pure mercenary troops used in history, literal private armies who fought for the highest bidder (if you're familiar with Game of Thrones, think of Daario's Second Sons.) These groups were prominent in the Thirty Years War, and were quite commonplace in the Renaissance era. Conversely, the Hessians of "Washington crossing the Delaware" fame were actual soldiers of the armies of various German principalities (quite often from Hesse, obviously), and the ruling prince would lease his army out to other combatants as a source of revenue. The leasing Prince himself would not necessarily be a combatant in the war, but his troops would do the fighting nevertheless. There is no universal answer, it all depends on which mercenaries and when and where they fought.
During the American War of Independence, Great Britain hired the armies of the German principalities, notably the Hesse-Cassel. It would be erroneous to call the German soldiers "mercenaries" in this regard as they did not fight for money or fortune. They were hired armies that the Princes lent to the British army. By January 1776, the British army had hired 12,000 Hessian troops for the war. Fully furnished and equipped, the Hessian army would embark to America and be placed along side the British army, but also under it. The regiments did have their own officer staff and generals, and early on had their own command. Lt. General Leopold Philip von Heister led the German army during the New York Campaign in 1776 but by the Southern Campaign in 1780 the regiments would fall under Cornwallis' command.
The Hessian regiments had battle hardened veterans and trained troops from the start, Hesse Cassel had been a militarized principality for a while now and trained under the Prussian standards. The British needed more soldiers and the princes needed money from the cost of having a standing army. While the soldiers came from Prussia, it would be up to the British to pay and feed the soldiers so one could say the employer switched from Prussian to British during the AWI. I would not say it resembles the modern day corporation as it leans more toward an alliance than contract work. Several of the princes had direct familial relations to King George III, an advantage for the British army. Just like an soldier, the Hessians obeyed their commanders when they embarked to America.