When customers return items (or you otherwise wish to provide the customer with a refund) you have the option of either providing them with a cash refund or using a prepayment to effectively give them a credit that they can use against future purchases.
You can return stock by using negative quantities in a sale. For example, if a customer returns an unused bag of food, simply create a sale that contains a quantity of negative one of that product.
So far so good, but unfortunately this sale can't be 'charged' to the customer's account (in the hope of creating a credit), as Xero doesn't support negative product quantities on a sale (Xero will reject any sales with negative quantities).
If your customer wants a cash refund then simply 'pay' the sale off using the cash payment method and hand them the correct amount of cash from your till. As the sale is for a negative amount, the till will remain in balance.
If your customer instead wants a 'credit' against their account you'll need to create a prepayment for this amount. First create the 'refund' sale as above, but don't give the customer the cash - your till will now be 'up' for the amount of the refund. Then create a prepayment against that customer for the amount of the refund, again using the cash payment method. Your till will now balance again and the customer will be able to use this prepayment against future invoices (effectively a 'credit', but one that will keep your accountant, and Xero, happy).
See our article on prepayments for advice on creating and managing prepayments.