In general, you have a grace period of one hour after your scheduled pickup time to get your grocery order. If you are late beyond that grace period, it depends entirely on the situation. Sometimes you can get your items later, and sometimes Walmart will cancel your order automatically, with or without a refund.
The exact amount of time it takes will vary for each refund, but Walmart claims that all refunds should process within 10 business days. It’s common for refunds to get back to you faster than that, but it really will be case-by-case when it comes to the exact amount of time required to finalize any given refund.