From the helpfiles:
Production points per hour multiplied with the market price of the goods the employee is producing. This figure is then divided by 100, then multiplied with the employee's salary demand and, finally divided by 20.
When the production of a factory goes up, this means that more production points are generated - therefore increasing the salary of the staff working in that factory. It also increases when the price of the goods produced goes up.
If the opposite happens - production slows down or price of the goods decreases, then the salary goes down as well.