You produce workers in the same way that you produce resources, with Village as the terrain type that produces villagers. You first pay the cost to use the Produce action (the revealed cost in red at the top of the action). Then you gain the benefit (produce on 2 different territories–ALL workers on those 2 territories may product).
For example, let’s say that you have 3 total workers on the board, which means that there is no exposed Produce cost in red. 2 of those workers are on a Mountain and the other worker is on a village. When you Produce, you pay nothing. Then you gain the benefit: Each of the workers on the mountain produces 1 metal, and the worker on the village produces 1 worker. The action is complete. The worker you produced revealed a cost, so the next time you take the Produce action, you must first pay that cost.