When a customer pays an invoice, record it with Receive payment (from + New, or the customer's page). Choose the customer, and their open invoices are listed. Type the amount received: it is applied to the oldest invoices first, and you can change what goes on each.
Saving the payment lowers A/R and the customer's balance, and closes the invoices it pays. The money goes where Deposit to says, usually Payments to deposit, until you take it to the bank.
Two mistakes cause most cleanup work later:
- recording a payment as a sales receipt or a deposit with an income category. The invoice stays open, and the sale is counted twice;
- leaving money unapplied. The customer's balance looks right, but the invoice still shows open and reminders go out for a bill that's paid.