Players start the game with two workers and can purchase additional ones by spending gems or buying special packages. As a resource, workers cannot be attacked or lost.
You can have a maximum of 20 workers total, as of Version 3.9.2. By this maximum, you can theoretically have all the castle structures (tavern, farm, troop academy, throne room, etc.) being upgraded simultaneously.
Every time you want to upgrade, dig, or build something, you need to assign a free worker for construction. As soon as you complete the job, the worker becomes free again, and can be assigned to a new job. Until then, the worker is unavailable and can only be freed up by completing the job, which can be finished instantly by spending gems.
The most efficient method to obtain workers at the least cost is through Offer Packages, with workers varying from +1 to +4 for heavily discounted gem prices. You can also buy workers at a 20% lower price during Events such as 'Boost Your Defense' or 'Boost Your Castle'.