Apple iPhones sold outright or with a plan through Virgin Mobile are not locked, and can be used with another carrier SIM or whilst overseas.
If you find your iPhone is locked, follow the instructions below to unlock it:
1. Updating your iPhone to the current iOS via iTunes will automatically unlock your iPhone.
If your phone is not compatible with the latest iOS then you will need to perform a Full Restore of your iPhone with the latest version of iTunes (ensure you back up your iPhone before restoring it).
2. Once the iPhone has been restored, you can insert the new carrier SIM card and Sync it with iTunes.
Note: Authorised Apple Carriers push the APN settings through iTunes so there would be no requirement to manually enter this information.