Before (or probably when) you buy a phone, one of the things you should always check is whether it is factory unlocked or not. You probably would want your phone unlocked, so that you are not forever bonded by one carrier/network provider. And checking the lock/unlock status of your phone is pretty easy to do.
Just head over to http://imei.info and enter your phone IMEI. You can find out your phone IMEI by dialing *#06# on your mobile.
It shows the information about your phone. Click on the “SIM LOCK AND WARRANTY ” icon, and you can get a view of details about whether your phone is factory locked or not.
If you use a Droid, there is an app on Google Play that does just the same thing. Head over to Google Play and download the app.
This method works with most phones, but not all phones. Moreover, if you use an Apple device, just connect it to iTunes and try to update or restore. At this point iTunes should tell you whether it is locked or not.