The employer pays the contracting firm based on the timesheet, then the contracting firm pays the employee based on the timesheet/pay they were forwarded.
When there's a problem with the employee not being paid, the root cause often goes back to the employer blocking the pay in the first place.