That has happened to me several times.
When you check in, that refunded amount will be in your account as a credit. So if you charge back to your room, you will owe that much less. For example, say you got $50 refunded, and you charged $150 to your room during your stay, then you would owe $100 when you check-out.
I guess if you want the money refunded right now, you could call and ask if they can refund back to your source of payment, but I have never bothered to do that.
If you don't exceed that refunded amount, then I assume you would be refunded whatever amount is left, when you check out. I've never had to worry about that, as we charge all of our food back to the room.