Provided you have officially unlocked the iPhone via carrier and apple confirmation process , your Virgin Mobile sim will be recognized and you will b able to call and browse web and set up email.
However you may NOT be able to send sms/mms.
The iPhone and iOS do have the ability and software to allow you to set the APN codes manually for GPRS and Web browsing however its subject to sim card support.
Many much/most sim cards issued by official IPhone carriers automatically set up these parameters and at the same time hide the console from view.
MVNO operators (Virtual operators that use other carriers networks) such as Giff Gaff/Virgin/BT/Tesco have to build in access to the hidden menu so you can change it from the host network settings.
To find out if you can modify the settings with the Virgin Sim do following
Officially Unlock Phone (Network may make a charge typically £20.00)
When unlocked swap out carrier sim and place Virgin sim in phone
Switch off and on and wait for network connection to take place
Tap on settings icon on phone the general/cellular
If your sim supports the function tat allows you to set the APN manually you will see a section called
Cellular Data Network Tab
Tap on this and a panel shows up where you can set the correct parameters manually.
For Virgin Mobile UK these are
Password: Leave blank (Nothing)
User name: wap
MMS proxy: 193.030.166.002..8060
MMS message size:Leave blank
MMS UA prof URL: default
Enter all those then boot of and on to set.
You should now have a working iPhone on Virgin UK.