https://www.northernlightsretail.com/howgiftcardswork.html
These days it should happen over the internet, not unlike most credit card payment machines. Should the internet be down then there are fallback methods like phones, and other means for manual activation, hence things like
https://www.giftcards.tesco.com/help/page1 saying you may have to wait 24 hours.
Said activation may happen with an intermediary service (big tech companies may do it themselves, indeed Amazon even sell that service onto small businesses that want it --
https://www.amazon.co.uk/corporate-rewards/b?ie=UTF8&node=11938304031 , but as it is a complicated procedure then not all simple retailers will care to do it). In that case it will be like most credit card machines and come however often you are set for payment (either value linked -- every time I get to £5000 drop some in, or the classic end of the month/week/? day period then deposit things).
Retailers may or may not pay a token sum for the physical cards (do bear in mind a lot of these sorts of things nowadays are numbers on a receipt), in the case of bigger retailers they may be outright given and said retailer regardless will get a percentage (term of choice to look up is called load value). Other times you might get the "we will hold £10000 from you to sell these, returnable as and when" thing, though you see that more in physical goods -- that number was the number Nike quoted a guy I was speaking to in a one man band skate shop to stock their product/deal with them directly.
So to answer your question most likely neither. More likely at the end of the month (or possibly shorter period) when the funds are transferred by the services involved.
Edit. As that was dry even by business discussion standards better have a video