Following instructions here:
http://support.apple.com/kb/HT1414
After, you might check one of the following sites to see if it's unlocked:
http://dev.mk/iphone-simlock-status-imei-checker/
http://www.unlockboot.com/2011/06/free-imei-checker-with-simlock-status-fixed.html