1. As items are scanned at the checkout, a certain amount is discounted from some of them. But since they have no way of knowing who you are, everyone gets this and there's no cash back.
2. You pay with a check in an amount greater than the total of the bill and get cash for the difference.
Sounds like the WalMart app. You scan the QR code on your receipt, and if any stores in your area are found with lower prices, you get the difference. I've gotten back almost $100 this way.