This can vary quite a bit. In a small asset sale, the account receivables and accounts payables are not usually included in the sale of a business. The buyer gets a clean slate and the seller pays off the accounts payable prior to the closing and adjustments are made if certain accounts payables have not been paid off. The seller then collects the accounts receivables for sales that were made prior to the closing but not collected.
Whether the sale is structured as an asset sale or stock sale also usually affects what is included in the sale price. In a stock sale, the accounts receivable and payables are typically included in the sale price so the buyer would be responsible for paying off the accounts payable but they would also collect the accounts receivable. With an asset sale, the buyer doesn’t get the accounts payable or receivables in most cases. However the larger the deal the more likely it is that accounts receivable will be included in the sale price.