To set up and run a payroll in Tally, the user must first press F11 and F1, then set "Maintain Payroll" and "More than one Payroll/Cost Category" to yes. The user then creates payheads, employee groups, employee group salary details, employees, and employee salary details. To process payroll, the user gives attendance for the month and generates payroll by pressing specified keyboard shortcuts. Payroll reports can be viewed in Tally by navigating to the payroll report page.