If you leave during a pay period, Payroll will calculate the amount you were overpaid and send you a letter asking you to write them a check. If you refuse to repay the overpayment, they will remove the overpaid amount from your W-2 earnings and send you a 1099 form for it so you are on the hook for the employer's side of the FICA/Med taxes. Keep in mind that you may be due vacation time which will help offset this. Vacation for management is considered earned at 1/12 per month so if you haven't taken any vacation time this year, you should have 1/12 of your annual vacation allotment due to you. If you have already taken vacation time this year that is considered unearned, they will ask you to repay that as well.
This happens all the time with a monthly pay cycle. It all really depends on what your manager puts down as your official last day and what he tells them you have taken for vacation as Payroll has zero visibility to what days management takes off.