Assuming you've initiated the unlock with your carrier and have given Apple sufficient time to update their database with your unlock. Remember, Apple unlocks your phone, not the carrier! This took a couple of weeks for me, yours may happen sooner. Then:
1. In iTunes do a backup of your phone (performing a Sync does the same thing).
2. When that's complete, in iTunes click the "Restore" button on the right. This will restore the phone to its factory state. At the end of this process you may or may not get the "Congratulations, your iPhone is now unlocked" message.
3. Next, right-click on your iPhone in the left column of iTunes and select Restore from Backup. This is where your phone is completely restored just as it was when you performed Step #1.
I didn't get the unlock message after the factory restore process, so I had to use
this site to check my status. It may take a day or two after you do the Backup-Restore-RestoreFromBackup procedure for your phone's lock status to get updated in their database, but it's a lot simpler than buying another carrier's sim to test the phone's status.