if your phone is locked then it will not accept other network SIM's
Virgin have roaming agreements with other networks so that when abroad their SIM's can connect enabling you to use your phone whilst roaming.
If you want to unlock your phone you can call the Virgin mobile team on 789 from your Virgin mobile or 0345 6000 789 from any other phone. Give them the phone details and your account information, they should be able to supply an unlock code (I think the charge is £17.32).
Alternatively, look on Google or eBay or pop it into your local independent phone shop. You may get it unlocked cheaper.
If you want to say thanks > click 'Kudos'. Answered your question? > click 'Mark as Helpful Answer' also.