Employees are liable for tax from the point they have earned the money. Employers act as Agents for HMRC and collect any tax due on it via payroll, which is known as PAYE (pay as you earn).
In terms of NICs, employers are liable for the ER NICs from the point the employee has earned the money.
There are some timing differences. So deductions for tax/NI will be processed before the employee receives their payment, and the payment they do receive will be net of any deductions. The employer then sends the money collected from salaries to HMRC.