You need to get a PAC (porting authority code) from your old mobile provider and give the code to Virgin so they can start the transfer. It might take some time to effect (a couple of days or so).
Your old mobile provider is obliged to provide this code on demand either verbally during the call where you ask for it or within two hours if they send it by text. The code expires if not used within 30 days. If you get the choice, text is the best option because you have an electronic "paper trail" if something goes wrong. Note that if you have already closed your account, your old provider might not be able to supply a PAC, depending on their systems' capability.
Incidentally, Virgin are obliged to comply with the same rules, but there have been reports on this forum that they don't always do that. Also, there have been reports that they cancel the account as soon as the PAC is requested instead of waiting 'til it is used.