For security reasons, Virgin require you to register the iPhone that you wish to unlock with them before they carry out the service. You will also need to pay all charges owing on the account before they can unlock your phone. The process can take up to 30 days (sometimes longer!) and in most cases costs around £15.
You will need to call Virgin to arrange an unlock, as they don't have an online form. The details are:
0345 6000 789 or just call 789 from your Virgin phone. Also refer to their tariff page and terms of service page for more information.
If you are not able to deal directly with Virgin, for example if you didn't buy your iPhone directly from Virgin, then there you can get your iPhone unlocked from OfficialiPhoneUnlock.co.uk. Unfortunately this can still take up to 2 or 3 weeks to happen, although in a lot of cases it's much faster. There is no need to register with Virgin mobile before using OfficialiPhoneUnlock.co.uk or to have paid off your remaining contract.